1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45: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.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) {
}
}

View file

@ -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());