rpms/eclipse-cdt/devel eclipse-cdt-scannerinfoplus.patch, NONE, 1.1 eclipse-cdt-subconsole.patch, NONE, 1.1 .cvsignore, 1.18, 1.19 eclipse-cdt.spec, 1.53, 1.54 sources, 1.20, 1.21

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Aug 29 20:12:21 UTC 2006


Author: jjohnstn

Update of /cvs/dist/rpms/eclipse-cdt/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv32317

Modified Files:
	.cvsignore eclipse-cdt.spec sources 
Added Files:
	eclipse-cdt-scannerinfoplus.patch eclipse-cdt-subconsole.patch 
Log Message:

* Tue Aug 29 2006 Jeff Johnston  <jjohnstn at redhat.com> 3.1.0-1jpp_13fc
- Rebase autotools to 0.0.4 source.
- Use ScannerInfoProvider extension instead of DynamicScannerInfoProvider.
- Add sub-console support to CDT.




eclipse-cdt-scannerinfoplus.patch:
 org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/IScannerInfoPlus.java    |   16 +++++++++
 org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OpenIncludeAction.java |   17 +++++++---
 2 files changed, 28 insertions(+), 5 deletions(-)

--- NEW FILE eclipse-cdt-scannerinfoplus.patch ---
--- ./results/plugins/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/IScannerInfoPlus.java.fix	2006-08-29 14:28:17.000000000 -0400
+++ ./results/plugins/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/IScannerInfoPlus.java	2006-08-29 14:28:54.000000000 -0400
@@ -0,0 +1,16 @@
+package org.eclipse.cdt.core.parser;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+
+public interface IScannerInfoPlus extends IScannerInfo {
+
+	/**
+	 * Map an open include file as being included by a specific resource.
+	 * 
+	 * @param include the include file
+	 * @param res the resource that included the include file
+	 */
+	public void createIncludeChain(IFile include, IResource res);
+
+}
--- ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OpenIncludeAction.java.fix	2006-08-29 14:32:46.000000000 -0400
+++ ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/OpenIncludeAction.java	2006-08-29 14:33:19.000000000 -0400
@@ -24,6 +24,7 @@ import org.eclipse.cdt.core.model.ICElem
 import org.eclipse.cdt.core.model.ICProject;
 import org.eclipse.cdt.core.model.ITranslationUnit;
 import org.eclipse.cdt.core.parser.IScannerInfo;
+import org.eclipse.cdt.core.parser.IScannerInfoPlus;
 import org.eclipse.cdt.core.parser.IScannerInfoProvider;
 import org.eclipse.cdt.internal.ui.CPluginImages;
 import org.eclipse.cdt.internal.ui.dialogs.ElementListSelectionDialog;
@@ -37,8 +38,10 @@ import org.eclipse.core.resources.IResou
 import org.eclipse.core.resources.IResourceProxyVisitor;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.QualifiedName;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.viewers.ILabelProvider;
 import org.eclipse.jface.viewers.ISelection;
@@ -79,17 +82,16 @@ public class OpenIncludeAction extends A
 		if (include == null) {
 			return;
 		}
-		
 		try {
 			IResource res = include.getUnderlyingResource();
+			IScannerInfo info = null;
 			ArrayList filesFound = new ArrayList(4);
 			if (res != null) {
 				IProject proj = res.getProject();
 				String includeName = include.getElementName();
-				// Search in the scannerInfo information
-				IScannerInfoProvider provider =  CCorePlugin.getDefault().getScannerInfoProvider(proj);
+				IScannerInfoProvider provider = CCorePlugin.getDefault().getScannerInfoProvider(proj);
 				if (provider != null) {
-					IScannerInfo info = provider.getScannerInformation(res);
+					info = provider.getScannerInformation(res);
 					// XXXX this should fall back to project by itself
 					if (info == null) {
 						info = provider.getScannerInformation(proj);
@@ -110,7 +112,7 @@ public class OpenIncludeAction extends A
 			if (nElementsFound == 0) {
 				noElementsFound();
 				fileToOpen= null;
-			} else if (nElementsFound == 1) {
+			} else if (nElementsFound == 1 || info instanceof IScannerInfoPlus) {
 				fileToOpen= (IPath) filesFound.get(0);
 			} else {
 				fileToOpen= chooseFile(filesFound);
@@ -119,6 +121,11 @@ public class OpenIncludeAction extends A
 			if (fileToOpen != null) {
 				IFile file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(fileToOpen);
 				if (file != null) {
+					// If dealing with an IScannerInfoPlus, we want to register
+					// the resource with the include file it includes.
+					if (info instanceof IScannerInfoPlus) {
+						((IScannerInfoPlus)info).createIncludeChain(file, res);
+					}
 					EditorUtility.openInEditor(file);
 				}  else {
 					ICProject cproject = include.getCProject();

eclipse-cdt-subconsole.patch:
 internal/ui/buildconsole/BuildConsole.java        |   16 ++++++++--
 internal/ui/buildconsole/BuildConsoleManager.java |   35 ++++++++++++++++++++++
 internal/ui/buildconsole/BuildConsolePage.java    |   21 +++++++++++--
 ui/CUIPlugin.java                                 |   25 +++++++++++++++
 4 files changed, 93 insertions(+), 4 deletions(-)

--- NEW FILE eclipse-cdt-subconsole.patch ---
--- ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsole.java.fix2	2006-08-29 14:38:17.000000000 -0400
+++ ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsole.java	2006-08-29 14:38:55.000000000 -0400
@@ -26,18 +26,30 @@ public class BuildConsole extends Abstra
 	public static final String P_STREAM_COLOR = CUIPlugin.PLUGIN_ID  + ".CONSOLE_P_STREAM_COLOR";	 //$NON-NLS-1$
 
 	private IBuildConsoleManager fConsoleManager;
+	private String fConsoleName;
+	private String fConsoleId;
+	private String fContextId;
 
 	public BuildConsole(IBuildConsoleManager manager) {
 		super(ConsoleMessages.getString("BuildConsole.buildConsole"), CPluginImages.DESC_BUILD_CONSOLE); //$NON-NLS-1$
 		fConsoleManager = manager;
+		fConsoleName = ConsoleMessages.getString("BuildConsole.buildConsole"); //$NON-NLS-1$
+	}
+
+	public BuildConsole(IBuildConsoleManager manager, String name, String id, String contextId) {
+		super(name, CPluginImages.DESC_BUILD_CONSOLE); //$NON-NLS-1$
+		fConsoleManager = manager;
+		fConsoleName = name;
+		fConsoleId = id;
+		fContextId = contextId;
 	}
 
 	public IPageBookViewPage createPage(IConsoleView view) {
-		return new BuildConsolePage(view, this);
+		return new BuildConsolePage(view, this, fConsoleId, fContextId);
 	}
 
 	public void setTitle(IProject project) {
-		String title = ConsoleMessages.getString("BuildConsole.buildConsole"); //$NON-NLS-1$
+		String title = fConsoleName;
 		if (project != null) {
 			title += " [" + project.getName() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
 		}
--- ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java.fix2	2006-08-29 14:39:17.000000000 -0400
+++ ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java	2006-08-29 14:39:25.000000000 -0400
@@ -85,6 +85,8 @@ public class BuildConsolePage extends Pa
 
 	private BuildConsole fConsole;
 	private IConsoleView fConsoleView;
+	private String fMenuId;
+	private String fContextMenuId;
 	private BuildConsoleViewer fViewer;
 	private IProject fProject;
 
@@ -109,10 +111,25 @@ public class BuildConsolePage extends Pa
 	/**
 	 * @param view
 	 * @param console
+	 * @param menuId
+	 */
+	public BuildConsolePage(IConsoleView view, BuildConsole console, 
+			String menuId, String contextMenuId) {
+		fConsole = console;
+		fConsoleView = view;
+		fMenuId = menuId;
+		fContextMenuId = contextMenuId;
+	}
+
+	/**
+	 * @param view
+	 * @param console
 	 */
 	public BuildConsolePage(IConsoleView view, BuildConsole console) {
 		fConsole = console;
 		fConsoleView = view;
+		fMenuId = "#MessageConsole";
+		fContextMenuId = "CConsole";
 	}
 
 	protected void setProject(IProject project) {
@@ -176,7 +193,7 @@ public class BuildConsolePage extends Pa
 	public void createControl(Composite parent) {
 		fViewer = new BuildConsoleViewer(parent);
 
-		MenuManager manager = new MenuManager("#MessageConsole", "#MessageConsole"); //$NON-NLS-1$ //$NON-NLS-2$
+		MenuManager manager = new MenuManager("#MessageConsole", fMenuId); //$NON-NLS-1$ //$NON-NLS-2$
 		manager.setRemoveAllWhenShown(true);
 		manager.addMenuListener(new IMenuListener() {
 
@@ -187,7 +204,7 @@ public class BuildConsolePage extends Pa
 		fMenu = manager.createContextMenu(getControl());
 		getControl().setMenu(fMenu);
 		IPageSite site = getSite();
-		site.registerContextMenu(CUIPlugin.PLUGIN_ID + ".CBuildConole", manager, getViewer()); //$NON-NLS-1$
+		site.registerContextMenu(CUIPlugin.PLUGIN_ID + "." + fContextMenuId, manager, getViewer()); //$NON-NLS-1$
 		site.setSelectionProvider(getViewer());
 		createActions();
 		configureToolBar(site.getActionBars().getToolBarManager());
--- ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleManager.java.fix2	2006-08-29 14:39:42.000000000 -0400
+++ ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleManager.java	2006-08-29 14:39:50.000000000 -0400
@@ -52,6 +52,7 @@ public class BuildConsoleManager impleme
 	private Map fConsoleMap = new HashMap();
 	Color infoColor, outputColor, errorColor;
 	BuildConsoleStream infoStream, outputStream, errorStream;
+	String fName, fSubMenuId, fContextMenuId;
 
 	static public final int BUILD_STREAM_TYPE_INFO = 0;
 	static public final int BUILD_STREAM_TYPE_OUTPUT = 1;
@@ -199,6 +200,40 @@ public class BuildConsoleManager impleme
 		CUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
 	}
 
+	public void startup(String name, String subMenuId, String contextMenuId) {
+		infoStream = new BuildConsoleStream();
+		outputStream = new BuildConsoleStream();
+		errorStream = new BuildConsoleStream();
+		fName = name;
+		fSubMenuId = subMenuId;
+		fContextMenuId = contextMenuId;
+
+		runUI(new Runnable() {
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see java.lang.Runnable#run()
+			 */
+			public void run() {
+				// install colors
+				fConsole = new BuildConsole(BuildConsoleManager.this, fName, fSubMenuId, fContextMenuId);
+				ConsolePlugin.getDefault().getConsoleManager().addConsoles(new org.eclipse.ui.console.IConsole[]{fConsole});
+				infoStream.setConsole(fConsole);
+				infoColor = createColor(CUIPlugin.getStandardDisplay(), BuildConsolePreferencePage.PREF_BUILDCONSOLE_INFO_COLOR);
+				infoStream.setColor(infoColor);
+				outputStream.setConsole(fConsole);
+				outputColor = createColor(CUIPlugin.getStandardDisplay(), BuildConsolePreferencePage.PREF_BUILDCONSOLE_OUTPUT_COLOR);
+				outputStream.setColor(outputColor);
+				errorStream.setConsole(fConsole);
+				errorColor = createColor(CUIPlugin.getStandardDisplay(), BuildConsolePreferencePage.PREF_BUILDCONSOLE_ERROR_COLOR);
+				errorStream.setColor(errorColor);
+			}
+		});
+		CUIPlugin.getWorkspace().addResourceChangeListener(this);
+		CUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * 
--- ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java.fix2	2006-08-29 14:36:10.000000000 -0400
+++ ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java	2006-08-29 14:36:40.000000000 -0400
@@ -14,8 +14,12 @@ package org.eclipse.cdt.ui;
 import java.io.IOException;
 import java.text.MessageFormat;
 import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
 import java.util.Set;
@@ -337,6 +341,7 @@ public class CUIPlugin extends AbstractU
 	private AsmTextTools fAsmTextTools;
 	private ProblemMarkerManager fProblemMarkerManager;
 	private BuildConsoleManager fBuildConsoleManager;
+	private Map fSubConsoleManagers = new HashMap();
 	private ResourceAdapterFactory fResourceAdapterFactory;
 	private CElementAdapterFactory fCElementAdapterFactory;
 
@@ -416,6 +421,16 @@ public class CUIPlugin extends AbstractU
 		return fBuildConsoleManager;
 	}
 
+	public IBuildConsoleManager getSubConsoleManager(String name, String id, String contextId) {
+		BuildConsoleManager manager = (BuildConsoleManager)fSubConsoleManagers.get(id);
+		if (manager == null ) {
+			manager = new BuildConsoleManager();
+			fSubConsoleManagers.put(id, manager);
+			manager.startup(name, id, contextId);
+		}
+		return manager;
+	}
+
 	/* (non-Javadoc)
 	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
 	 */
@@ -443,6 +458,16 @@ public class CUIPlugin extends AbstractU
 		}
 		if (fImageDescriptorRegistry != null)
 			fImageDescriptorRegistry.dispose();
+		
+		if (!fSubConsoleManagers.isEmpty()) {
+			Collection x = fSubConsoleManagers.values();
+			for (Iterator i = x.iterator(); i.hasNext(); ) {
+				BuildConsoleManager b = (BuildConsoleManager)i.next();
+				b.shutdown();
+			}
+			fSubConsoleManagers.clear();
+		}
+		
 		if ( fBuildConsoleManager != null ) {
 			fBuildConsoleManager.shutdown();
 			fBuildConsoleManager = null;


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/eclipse-cdt/devel/.cvsignore,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- .cvsignore	24 Jul 2006 22:04:52 -0000	1.18
+++ .cvsignore	29 Aug 2006 20:12:15 -0000	1.19
@@ -1,2 +1,3 @@
 eclipse-cdt-fetched-src-3.1.0.tar.bz2
 eclipse-cdt-autotools-0.0.3.tar.gz
+eclipse-cdt-autotools-0.0.4.tar.gz


Index: eclipse-cdt.spec
===================================================================
RCS file: /cvs/dist/rpms/eclipse-cdt/devel/eclipse-cdt.spec,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- eclipse-cdt.spec	21 Aug 2006 21:27:19 -0000	1.53
+++ eclipse-cdt.spec	29 Aug 2006 20:12:15 -0000	1.54
@@ -21,7 +21,7 @@
 Summary: 	%{pkg_summary}
 Name: 		%{eclipse_name}-cdt
 Version: 	%{majmin}.%{micro}
-Release: 	1jpp_12fc
+Release: 	1jpp_13fc
 License:	Eclipse Public License - v 1.0 (EPL) <http://www.eclipse.org/legal/epl-v10.html>
 Group: 		Text Editors/Integrated Development Environments (IDE)
 URL:		http://www.eclipse.org/cdt
@@ -43,16 +43,14 @@
 #   -DdontUnzip=true fetch
 # cd .. && tar jcf eclipse-cdt-fetched-src-3.1.0.tar.bz2 org.eclipse.cdt.releng
 Source0: %{name}-fetched-src-%{version}.tar.bz2
-Source1: %{name}-autotools-0.0.3.tar.gz
+Source1: %{name}-autotools-0.0.4.tar.gz
 
 Patch1: %{name}-no-cvs2-patch
 Patch2: %{name}-platform-build-linux.patch
 Patch3: %{name}-sdk-build-linux.patch
 Patch4: %{name}-no-tests.patch
-Patch5: %{name}-dynamic-scannerinfo-ext.patch
-Patch6: %{name}-libhover-jar.patch
-Patch7: %{name}-mm-builder.patch
-Patch8: %{name}-configuration.patch
+Patch5: %{name}-subconsole.patch
+Patch6: %{name}-scannerinfoplus.patch
 
 BuildRequires: eclipse-pde
 %if %{gcj_support}
@@ -94,6 +92,7 @@
 %patch3 -p0
 %patch4 -p0
 %patch5 -p0
+%patch6 -p0
 popd
 
 # Autotools stuff
@@ -101,9 +100,6 @@
 mkdir autotools
 pushd autotools
 tar -xzf %{SOURCE1}
-%patch6 -p0
-%patch7 -p0
-%patch8 -p0
 popd
 
 # Upstream CVS includes random .so files.  Let's remove them now.
@@ -272,6 +268,11 @@
 %endif
 
 %changelog
+* Tue Aug 29 2006 Jeff Johnston  <jjohnstn at redhat.com> 3.1.0-1jpp_13fc
+- Rebase autotools to 0.0.4 source.
+- Use ScannerInfoProvider extension instead of DynamicScannerInfoProvider.
+- Add sub-console support to CDT.
+
 * Mon Aug 21 2006 Jeff Johnston  <jjohnstn at redhat.com> 3.1.0-1jpp_12fc
 - Fix build special targets when project hasn't configured yet.
 - Fix to fully reconfigure after configuration options change.


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/eclipse-cdt/devel/sources,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- sources	24 Jul 2006 22:04:53 -0000	1.20
+++ sources	29 Aug 2006 20:12:15 -0000	1.21
@@ -1,2 +1,2 @@
 8ea0a06e13227728d3922bab3496509e  eclipse-cdt-fetched-src-3.1.0.tar.bz2
-c475012b6bf7e3cd3aea20a690b50c15  eclipse-cdt-autotools-0.0.3.tar.gz
+1402fa414d57828fc1d55f72048d05d0  eclipse-cdt-autotools-0.0.4.tar.gz




More information about the fedora-cvs-commits mailing list