1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Comment out the references to the old build for now

This commit is contained in:
Alain Magloire 2003-02-14 01:17:11 +00:00
parent 126d969695
commit 69f5cde8c4
2 changed files with 43 additions and 54 deletions

View file

@ -6,14 +6,9 @@ package org.eclipse.cdt.internal.core.make;
import org.eclipse.cdt.core.AbstractCExtension; import org.eclipse.cdt.core.AbstractCExtension;
import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.ICExtensionReference;
import org.eclipse.cdt.core.builder.CIncrementalBuilder;
import org.eclipse.cdt.core.builder.ICBuilder;
import org.eclipse.cdt.core.builder.IOptimization;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
public class MakeBuilder extends AbstractCExtension implements ICBuilder { public class MakeBuilder extends AbstractCExtension /*implements ICBuilder */ {
public IPath[] getIncludePaths() { public IPath[] getIncludePaths() {
return new IPath[0]; return new IPath[0];
@ -36,21 +31,22 @@ public class MakeBuilder extends AbstractCExtension implements ICBuilder {
public void setLibraries(String[] libs) { public void setLibraries(String[] libs) {
} }
public IOptimization getOptimization() { // public IOptimization getOptimization() {
return null; // return null;
} // }
//
public IProject[] build(CIncrementalBuilder cbuilder) { // public IProject[] build(CIncrementalBuilder cbuilder) {
ICExtensionReference ref = getExtensionReference(); // ICExtensionReference ref = getExtensionReference();
System.out.println("MakeBuilder!!!!\n Command is:" + ref.getExtensionData("command")); // System.out.println("MakeBuilder!!!!\n Command is:" + ref.getExtensionData("command"));
return null; // return null;
} // }
//
// public void setOptimization(IOptimization o) {
// }
public String getID() { public String getID() {
return CCorePlugin.PLUGIN_ID + ".makeBuilder"; return CCorePlugin.PLUGIN_ID + ".makeBuilder";
} }
public void setOptimization(IOptimization o) {
}
} }

View file

@ -8,14 +8,18 @@ package org.eclipse.cdt.internal.ui.editor;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.internal.ui.CPluginImages;
import org.eclipse.cdt.internal.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.cdt.internal.ui.util.EditorUtility;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Path;
import org.eclipse.jface.action.Action; import org.eclipse.jface.action.Action;
import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelection;
@ -23,23 +27,11 @@ import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.window.Window; import org.eclipse.jface.window.Window;
import org.eclipse.ui.IEditorDescriptor; import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorRegistry; import org.eclipse.ui.IEditorRegistry;
import org.eclipse.ui.PlatformUI; import org.eclipse.ui.PlatformUI;
import org.eclipse.cdt.internal.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.cdt.internal.ui.util.EditorUtility;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.internal.ui.CPluginImages;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.builder.ICBuilder;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.ICElement;
public class OpenIncludeAction extends Action { public class OpenIncludeAction extends Action {
@ -87,29 +79,30 @@ public class OpenIncludeAction extends Action {
EditorUtility.openInEditor(fileToOpen); EditorUtility.openInEditor(fileToOpen);
} else { // Try to get via the include path. } else { // Try to get via the include path.
ICBuilder[] builders = CCorePlugin.getDefault().getBuilders(res.getProject()); // This code is for getting the include paths from the builder.
// ICBuilder[] builders = CCorePlugin.getDefault().getBuilders(res.getProject());
IPath includePath = null; //
for( int j = 0; includePath == null && j < builders.length; j++ ) { // IPath includePath = null;
IPath[] paths = builders[j].getIncludePaths(); // for( int j = 0; includePath == null && j < builders.length; j++ ) {
// IPath[] paths = builders[j].getIncludePaths();
for (int i = 0; i < paths.length; i++) { //
if (res != null) { // for (int i = 0; i < paths.length; i++) {
// We've already scan the project. // if (res != null) {
if (paths[i].isPrefixOf(res.getProject().getLocation())) // // We've already scan the project.
continue; // if (paths[i].isPrefixOf(res.getProject().getLocation()))
} // continue;
IPath path = paths[i].append(include.getElementName()); // }
if (path.toFile().exists()) { // IPath path = paths[i].append(include.getElementName());
includePath = path; // if (path.toFile().exists()) {
break; // includePath = path;
} // break;
} // }
} // }
// }
if (includePath != null) { //
EditorUtility.openInEditor(includePath); // if (includePath != null) {
} // EditorUtility.openInEditor(includePath);
// }
} }
} catch (CModelException e) { } catch (CModelException e) {
CUIPlugin.getDefault().log(e.getStatus()); CUIPlugin.getDefault().log(e.getStatus());