rpms/eclipse-cdt/FC-6 eclipse-cdt-buildconsole.patch, NONE, 1.1 .cvsignore, 1.23, 1.24 eclipse-cdt.spec, 1.64, 1.65 sources, 1.28, 1.29 eclipse-cdt-subconsole.patch, 1.1, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Feb 21 21:33:50 UTC 2007


Author: jjohnstn

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

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

* Wed Feb 21 2007 Jeff Johnston <jjohnstn at redhat.com> 3.1.2-9
- Rebase CDT to 3.1.2.
- Rebase autotools to 0.0.8 source.
- Replace subconsole patch with new build console patch.




eclipse-cdt-buildconsole.patch:
 internal/ui/buildconsole/BuildConsole.java        |   13 ++++--
 internal/ui/buildconsole/BuildConsoleManager.java |   11 ++++-
 internal/ui/buildconsole/BuildConsolePage.java    |    9 +++-
 ui/CUIPlugin.java                                 |   44 +++++++++++++++++-----
 4 files changed, 60 insertions(+), 17 deletions(-)

--- NEW FILE eclipse-cdt-buildconsole.patch ---
--- ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleManager.java.fix	2007-02-21 15:11:53.000000000 -0500
+++ ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleManager.java	2007-02-21 15:16:17.000000000 -0500
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     QNX Software Systems - initial API and implementation
+ *     Red Hat Inc. - multiple build console support
  *******************************************************************************/
 package org.eclipse.cdt.internal.ui.buildconsole;
 
@@ -52,11 +53,14 @@ 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;
 	static public final int BUILD_STREAM_TYPE_ERROR = 2;
 	private IProject fLastProject;
+	
+	static public final String DEFAULT_CONTEXT_MENU_ID = CUIPlugin.PLUGIN_ID + ".CBuildConole"; //$NON-NLS-1$
 
 	public BuildConsoleManager() {
 	}
@@ -168,10 +172,12 @@ public class BuildConsoleManager impleme
 		}
 	}
 
-	public void startup() {
+	public void startup(String name, String id) {
 		infoStream = new BuildConsoleStream();
 		outputStream = new BuildConsoleStream();
 		errorStream = new BuildConsoleStream();
+		fName = name;
+		fContextMenuId = id;
 
 		runUI(new Runnable() {
 
@@ -182,7 +188,7 @@ public class BuildConsoleManager impleme
 			 */
 			public void run() {
 				// install colors
-				fConsole = new BuildConsole(BuildConsoleManager.this);
+				fConsole = new BuildConsole(BuildConsoleManager.this, fName, fContextMenuId);
 				ConsolePlugin.getDefault().getConsoleManager().addConsoles(new org.eclipse.ui.console.IConsole[]{fConsole});
 				infoStream.setConsole(fConsole);
 				infoColor = createColor(CUIPlugin.getStandardDisplay(), BuildConsolePreferencePage.PREF_BUILDCONSOLE_INFO_COLOR);
@@ -199,6 +205,7 @@ public class BuildConsoleManager impleme
 		CUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
 	}
 
+
 	/*
 	 * (non-Javadoc)
 	 * 
--- ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsole.java.fix	2007-02-21 15:12:09.000000000 -0500
+++ ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsole.java	2007-02-21 15:16:17.000000000 -0500
@@ -7,6 +7,7 @@
  *
  * Contributors:
  * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - Multiple build console support
  *******************************************************************************/
 package org.eclipse.cdt.internal.ui.buildconsole;
 
@@ -26,18 +27,22 @@ 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;
 
-	public BuildConsole(IBuildConsoleManager manager) {
-		super(ConsoleMessages.getString("BuildConsole.buildConsole"), CPluginImages.DESC_BUILD_CONSOLE); //$NON-NLS-1$
+	public BuildConsole(IBuildConsoleManager manager, String name, String id) {
+		super(name, CPluginImages.DESC_BUILD_CONSOLE);
 		fConsoleManager = manager;
+		fConsoleName = name;
+		fConsoleId = id;
 	}
 
 	public IPageBookViewPage createPage(IConsoleView view) {
-		return new BuildConsolePage(view, this);
+		return new BuildConsolePage(view, this, fConsoleId);
 	}
 
 	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.fix	2007-02-21 15:12:28.000000000 -0500
+++ ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java	2007-02-21 15:16:17.000000000 -0500
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     QNX Software Systems - initial API and implementation
+ *     Red Hat Inc. - multiple build console support
  *******************************************************************************/
 package org.eclipse.cdt.internal.ui.buildconsole;
 
@@ -85,6 +86,7 @@ public class BuildConsolePage extends Pa
 
 	private BuildConsole fConsole;
 	private IConsoleView fConsoleView;
+	private String fContextMenuId;
 	private BuildConsoleViewer fViewer;
 	private IProject fProject;
 
@@ -109,10 +111,13 @@ public class BuildConsolePage extends Pa
 	/**
 	 * @param view
 	 * @param console
+	 * @param contextId
 	 */
-	public BuildConsolePage(IConsoleView view, BuildConsole console) {
+	public BuildConsolePage(IConsoleView view, BuildConsole console, 
+			String contextId) {
 		fConsole = console;
 		fConsoleView = view;
+		fContextMenuId = contextId;
 	}
 
 	protected void setProject(IProject project) {
@@ -187,7 +192,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/ui/CUIPlugin.java.fix	2007-02-21 15:15:37.000000000 -0500
+++ ./results/plugins/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java	2007-02-21 15:16:17.000000000 -0500
@@ -14,8 +14,10 @@ package org.eclipse.cdt.ui;
 import java.io.IOException;
 import java.text.MessageFormat;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
 import java.util.Set;
@@ -32,6 +34,7 @@ import org.eclipse.cdt.internal.ui.ICSta
 import org.eclipse.cdt.internal.ui.IContextMenuConstants;
 import org.eclipse.cdt.internal.ui.ResourceAdapterFactory;
 import org.eclipse.cdt.internal.ui.buildconsole.BuildConsoleManager;
+import org.eclipse.cdt.internal.ui.buildconsole.ConsoleMessages;
 import org.eclipse.cdt.internal.ui.editor.CDocumentProvider;
 import org.eclipse.cdt.internal.ui.editor.CustomBufferFactory;
 import org.eclipse.cdt.internal.ui.editor.ExternalSearchDocumentProvider;
@@ -336,7 +339,7 @@ public class CUIPlugin extends AbstractU
 	private CTextTools fTextTools;
 	private AsmTextTools fAsmTextTools;
 	private ProblemMarkerManager fProblemMarkerManager;
-	private BuildConsoleManager fBuildConsoleManager;
+	private Map fBuildConsoleManagers;
 	private ResourceAdapterFactory fResourceAdapterFactory;
 	private CElementAdapterFactory fCElementAdapterFactory;
 
@@ -356,7 +359,8 @@ public class CUIPlugin extends AbstractU
 	public CUIPlugin() {
 		fgCPlugin = this;
 		fDocumentProvider = null;
-		fTextTools = null;		
+		fTextTools = null;
+		fBuildConsoleManagers = new HashMap();
 	}
 		
 	/**
@@ -408,12 +412,28 @@ public class CUIPlugin extends AbstractU
 		return fAsmTextTools;
 	}
 
+	/**
+	 * Return the default console manager.
+	 * @return IBuildConsoleManager
+	 */
 	public IBuildConsoleManager getConsoleManager() {
-		if ( fBuildConsoleManager == null ) {
-			fBuildConsoleManager = new BuildConsoleManager();
-			fBuildConsoleManager.startup();
+		return getConsoleManager(ConsoleMessages.getString("BuildConsole.buildConsole"), BuildConsoleManager.DEFAULT_CONTEXT_MENU_ID); //$NON-NLS-1$
+	}
+
+	/**
+	 * Return a console manager specified by id.
+	 * @param name console name
+	 * @param id console id
+	 * @return IBuildConsoleManager
+	 */	
+	public IBuildConsoleManager getConsoleManager(String name, String id) {
+		BuildConsoleManager manager = (BuildConsoleManager)fBuildConsoleManagers.get(id);
+		if (manager == null ) {
+			manager = new BuildConsoleManager();
+			fBuildConsoleManagers.put(id, manager);
+			manager.startup(name, id);
 		}
-		return fBuildConsoleManager;
+		return manager;
 	}
 
 	/* (non-Javadoc)
@@ -443,9 +463,15 @@ public class CUIPlugin extends AbstractU
 		}
 		if (fImageDescriptorRegistry != null)
 			fImageDescriptorRegistry.dispose();
-		if ( fBuildConsoleManager != null ) {
-			fBuildConsoleManager.shutdown();
-			fBuildConsoleManager = null;
+		
+		if (fBuildConsoleManagers != null ) {
+			Object[] bcm = fBuildConsoleManagers.values().toArray();
+			for (int i = 0; i < bcm.length; ++i) {
+				BuildConsoleManager m = (BuildConsoleManager)bcm[i];
+				if (m != null)
+					m.shutdown();
+			}
+			fBuildConsoleManagers.clear();
 		}
 
 		unregisterAdapters();


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/eclipse-cdt/FC-6/.cvsignore,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- .cvsignore	29 Jan 2007 19:15:20 -0000	1.23
+++ .cvsignore	21 Feb 2007 21:33:48 -0000	1.24
@@ -4,3 +4,5 @@
 eclipse-cdt-autotools-0.0.6.tar.gz
 eclipse-cdt-autotools-0.0.6.1.tar.gz
 eclipse-cdt-autotools-0.0.7.tar.gz
+eclipse-cdt-fetched-src-3.1.2.tar.bz2
+eclipse-cdt-autotools-0.0.8.tar.gz


Index: eclipse-cdt.spec
===================================================================
RCS file: /cvs/dist/rpms/eclipse-cdt/FC-6/eclipse-cdt.spec,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- eclipse-cdt.spec	29 Jan 2007 19:15:20 -0000	1.64
+++ eclipse-cdt.spec	21 Feb 2007 21:33:48 -0000	1.65
@@ -4,7 +4,7 @@
 %define major                   3
 %define minor                   1       
 %define majmin                  %{major}.%{minor}
-%define micro                   1
+%define micro                   2
 %define eclipse_base            %{_datadir}/eclipse
 %define eclipse_lib_base        %{_libdir}/eclipse
 
@@ -18,7 +18,7 @@
 Summary:        Eclipse C/C++ Development Tools (CDT) plugin
 Name:           eclipse-cdt
 Version:        %{majmin}.%{micro}
-Release:        8%{?dist}
+Release:        1%{?dist}
 License:        Eclipse Public License / CPL
 Group:          Development/Tools
 URL:            http://www.eclipse.org/cdt
@@ -28,30 +28,30 @@
 #
 # mkdir temp && cd temp
 # mkdir home
-# cvs -d:pserver:anonymous at dev.eclipse.org:/cvsroot/tools export -r CDT_3_1_1 \
+# cvs -d:pserver:anonymous at dev.eclipse.org:/cvsroot/tools export -r CDT_3_1_2 \
 #   org.eclipse.cdt-releng/org.eclipse.cdt.releng
 # cd org.eclipse.cdt-releng/org.eclipse.cdt.releng/
-# sed --in-place 's/@cdtTag@/CDT_3_1_1/' maps/cdt.map
+# sed --in-place 's/@cdtTag@/CDT_3_1_2/' maps/cdt.map
 # sed --in-place 's/home/cvsroot/' maps/cdt.map
 # eclipse -nosplash -Duser.home=../../home \
 #   -application org.eclipse.ant.core.antRunner \
 #   -buildfile build.xml -DbaseLocation=/usr/share/eclipse \
 #   -Dpde.build.scripts=/usr/share/eclipse/plugins/org.eclipse.pde.build/scripts \
 #   -DdontUnzip=true fetch
-# cd .. && tar jcf eclipse-cdt-fetched-src-3.1.1.tar.bz2 org.eclipse.cdt.releng
+# cd .. && tar jcf eclipse-cdt-fetched-src-3.1.2.tar.bz2 org.eclipse.cdt.releng
 
 Source0: %{name}-fetched-src-%{version}.tar.bz2
 
 # The following tarball was generated thusly:
 #
 # mkdir temp && cd temp
-# cvs -d:pserver:anonymous at sources.redhat.com:/cvs/eclipse export -r autotools-0_0_7 \
+# cvs -d:pserver:anonymous at sources.redhat.com:/cvs/eclipse export -r autotools-0_0_8 \
 #   autotools/com.redhat.eclipse.cdt.autotools autotools/com.redhat.eclipse.cdt.autotools-docs \
 #   autotools/com.redhat.eclipse.cdt.autotools.feature
 # cd autotools
-# tar -czvf eclipse-cdt-autotools-0.0.7.tar.gz com.redhat.eclipse.cdt.autotools*
+# tar -czvf eclipse-cdt-autotools-0.0.8.tar.gz com.redhat.eclipse.cdt.autotools*
 
-Source1: %{name}-autotools-0.0.7.tar.gz
+Source1: %{name}-autotools-0.0.8.tar.gz
 
 # The following tarball was generated thusly:
 #
@@ -68,9 +68,9 @@
 Patch1: %{name}-no-cvs2-patch
 # Patch to remove tests from CDT build.xml.
 Patch4: %{name}-no-tests.patch
-# Patch to CDT to add the ability to specify a build subconsole.  Subconsole is
-# used by Autotools to display configuration output.
-Patch5: %{name}-subconsole.patch
+# Patch to CDT to add the ability to specify a build subconsole.  The additional
+# build console is # used by Autotools to display configuration output.
+Patch5: %{name}-buildconsole.patch
 # Patch to add new IScannerInfoPlus interface to CDT and add code to recognize it
 # when opening header files via clicking on them in the outline view.  This
 # stops multiple include paths from being shown when the true path is already
@@ -314,6 +314,11 @@
 %doc %{eclipse_base}/features/org.eclipse.cdt.sdk_*/epl-v10.html
 
 %changelog
+* Wed Feb 21 2007 Jeff Johnston <jjohnstn at redhat.com> 3.1.2-1
+- Rebase CDT to 3.1.2.
+- Rebase autotools to 0.0.8 source.
+- Replace subconsole patch with new build console patch.
+
 * Mon Jan 29 2007 Jeff Johnston <jjohnstn at redhat.com> 3.1.1-8
 - Resolves: #214624, #224644
 - Rebase autotools to 0.0.7 source.


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/eclipse-cdt/FC-6/sources,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- sources	29 Jan 2007 19:15:20 -0000	1.28
+++ sources	21 Feb 2007 21:33:48 -0000	1.29
@@ -1,3 +1,3 @@
-922f65074113363570d0f5a0b56a1e70  eclipse-cdt-fetched-src-3.1.1.tar.bz2
 5c470fb0777d27541edbfa31443d91f7  eclipse-cdt-cppunit-20061102.tar.gz
-96b6a6542a4514832262c2fbd5b4cb09  eclipse-cdt-autotools-0.0.7.tar.gz
+00ce7b1810685e56375f8df48cc9ae26  eclipse-cdt-fetched-src-3.1.2.tar.bz2
+6f9452ece766ef0b676942cd863c2c31  eclipse-cdt-autotools-0.0.8.tar.gz


--- eclipse-cdt-subconsole.patch DELETED ---




More information about the fedora-cvs-commits mailing list