From 69f5cde8c4ecd0a671a5a3c64b45d2cea9b847ed Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Fri, 14 Feb 2003 01:17:11 +0000 Subject: [PATCH] Comment out the references to the old build for now --- .../cdt/internal/core/make/MakeBuilder.java | 30 ++++----- .../internal/ui/editor/OpenIncludeAction.java | 67 +++++++++---------- 2 files changed, 43 insertions(+), 54 deletions(-) diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/make/MakeBuilder.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/make/MakeBuilder.java index 1e594c83f9e..6eda8ba3462 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/make/MakeBuilder.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/make/MakeBuilder.java @@ -6,14 +6,9 @@ package org.eclipse.cdt.internal.core.make; import org.eclipse.cdt.core.AbstractCExtension; 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; -public class MakeBuilder extends AbstractCExtension implements ICBuilder { +public class MakeBuilder extends AbstractCExtension /*implements ICBuilder */ { public IPath[] getIncludePaths() { return new IPath[0]; @@ -36,21 +31,22 @@ public class MakeBuilder extends AbstractCExtension implements ICBuilder { public void setLibraries(String[] libs) { } - public IOptimization getOptimization() { - return null; - } - - public IProject[] build(CIncrementalBuilder cbuilder) { - ICExtensionReference ref = getExtensionReference(); - System.out.println("MakeBuilder!!!!\n Command is:" + ref.getExtensionData("command")); - return null; - } +// public IOptimization getOptimization() { +// return null; +// } +// +// public IProject[] build(CIncrementalBuilder cbuilder) { +// ICExtensionReference ref = getExtensionReference(); +// System.out.println("MakeBuilder!!!!\n Command is:" + ref.getExtensionData("command")); +// return null; +// } +// +// public void setOptimization(IOptimization o) { +// } public String getID() { return CCorePlugin.PLUGIN_ID + ".makeBuilder"; } - public void setOptimization(IOptimization o) { - } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OpenIncludeAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OpenIncludeAction.java index fff2780f0c5..cd475620ea1 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OpenIncludeAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OpenIncludeAction.java @@ -8,14 +8,18 @@ package org.eclipse.cdt.internal.ui.editor; import java.util.ArrayList; 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.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; - import org.eclipse.jface.action.Action; import org.eclipse.jface.viewers.ILabelProvider; 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.LabelProvider; import org.eclipse.jface.window.Window; - import org.eclipse.ui.IEditorDescriptor; import org.eclipse.ui.IEditorRegistry; 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 { @@ -87,29 +79,30 @@ public class OpenIncludeAction extends Action { EditorUtility.openInEditor(fileToOpen); } else { // Try to get via the include path. - ICBuilder[] builders = CCorePlugin.getDefault().getBuilders(res.getProject()); - - IPath includePath = null; - 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) { - // We've already scan the project. - if (paths[i].isPrefixOf(res.getProject().getLocation())) - continue; - } - IPath path = paths[i].append(include.getElementName()); - if (path.toFile().exists()) { - includePath = path; - break; - } - } - } - - if (includePath != null) { - EditorUtility.openInEditor(includePath); - } +// 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[] paths = builders[j].getIncludePaths(); +// +// for (int i = 0; i < paths.length; i++) { +// if (res != null) { +// // We've already scan the project. +// if (paths[i].isPrefixOf(res.getProject().getLocation())) +// continue; +// } +// IPath path = paths[i].append(include.getElementName()); +// if (path.toFile().exists()) { +// includePath = path; +// break; +// } +// } +// } +// +// if (includePath != null) { +// EditorUtility.openInEditor(includePath); +// } } } catch (CModelException e) { CUIPlugin.getDefault().log(e.getStatus());