rpms/eclipse-cdt/devel eclipse-cdt-managedConfigurations-fix.patch, NONE, 1.1 .cvsignore, 1.39, 1.40 eclipse-cdt.spec, 1.112, 1.113 sources, 1.48, 1.49

Jeff Johnston jjohnstn at fedoraproject.org
Thu Nov 6 23:57:50 UTC 2008


Author: jjohnstn

Update of /cvs/extras/rpms/eclipse-cdt/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18285

Modified Files:
	.cvsignore eclipse-cdt.spec sources 
Added Files:
	eclipse-cdt-managedConfigurations-fix.patch 
Log Message:

* Thu Nov 06 2008 Jeff Johnston <jjohnstn at redhat.com> 5.0.0-11
- Fix managed configurations dialog problem.
- Update libhover and autotools source tarballs to 20081106 snapshot.



eclipse-cdt-managedConfigurations-fix.patch:

--- NEW FILE eclipse-cdt-managedConfigurations-fix.patch ---
Index: src/org/eclipse/cdt/ui/newui/AbstractPage.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java,v
retrieving revision 1.63
diff -u -r1.63 AbstractPage.java
--- src/org/eclipse/cdt/ui/newui/AbstractPage.java	29 May 2008 10:31:51 -0000	1.63
+++ src/org/eclipse/cdt/ui/newui/AbstractPage.java	6 Nov 2008 00:37:18 -0000
@@ -68,6 +68,7 @@
 import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation;
 import org.eclipse.ui.dialogs.PropertyPage;
 
+import org.eclipse.cdt.core.CCorePlugin;
 import org.eclipse.cdt.core.model.CoreModel;
 import org.eclipse.cdt.core.model.ICElement;
 import org.eclipse.cdt.core.model.ICProject;
@@ -79,6 +80,7 @@
 import org.eclipse.cdt.core.settings.model.ICProjectDescription;
 import org.eclipse.cdt.core.settings.model.ICResourceDescription;
 import org.eclipse.cdt.core.settings.model.MultiItemsHolder;
+import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
 import org.eclipse.cdt.ui.CUIPlugin;
 import org.eclipse.cdt.ui.PreferenceConstants;
 import org.eclipse.cdt.utils.ui.controls.ControlFactory;
@@ -468,7 +470,7 @@
      *  
      *  @param prj - project description where we'll search (or create) config description
      *  @param cfg - config description belonging to another project description, 
-     *               it is a sample for search and base for possile creation
+     *               it is a sample for search and base for possible creation
      *               of resulting configuration description.
      *                  
      *  @return the configuration description (found or created) or null in case of error
@@ -479,11 +481,27 @@
 		ICConfigurationDescription c = prj.getConfigurationById(id);
 		// if there's no cfg found, try to create it
 		if (c == null) {
-			try {
-				c = prj.createConfiguration(id, cfg.getName(), cfg);
-				c.setDescription(cfg.getDescription());
-			} catch (CoreException e) { 
-				/* do nothing: c is already null */ 
+			// see if this is a configuration that is known to the project description cached by the
+			// CDTPropertyPage (e.g. config has been added via New Configuration Dialog)
+			ICProjectDescription prj2 = CDTPropertyManager.getProjectDescription(AbstractPage.this, getProject());
+			ICConfigurationDescription c2 = prj2.getConfigurationById(id);
+			if (c2 != null) {
+				// cfg found...let's use the same build system id and create it on the 
+				// project description passed in
+				try {
+					CConfigurationData data = cfg.getConfigurationData();
+					c = prj.createConfiguration(c2.getBuildSystemId(), data);
+				} catch (CoreException e) {
+					/* do nothing: c is already null */
+				}
+			} else {
+				// not found..let's create it anyway
+				try {
+					CConfigurationData data = cfg.getConfigurationData();
+					c = prj.createConfiguration(CCorePlugin.DEFAULT_PROVIDER_ID, data);
+				} catch (CoreException e) {
+					/* do nothing: c is already null */
+				}
 			}
 		}
 		// if creation failed, report an error and return null


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/eclipse-cdt/devel/.cvsignore,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- .cvsignore	15 Oct 2008 23:08:47 -0000	1.39
+++ .cvsignore	6 Nov 2008 23:57:20 -0000	1.40
@@ -17,3 +17,5 @@
 eclipse-cdt-fetched-src-CDT_5_0_0.tar.bz2
 eclipse-cdt-fetched-src-autotools-1_0_1.tar.gz
 eclipse-cdt-fetched-src-libhover-1_0_0.tar.gz
+eclipse-cdt-fetched-src-autotools-20081106.tar.gz
+eclipse-cdt-fetched-src-libhover-20081106.tar.gz


Index: eclipse-cdt.spec
===================================================================
RCS file: /cvs/extras/rpms/eclipse-cdt/devel/eclipse-cdt.spec,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -r1.112 -r1.113
--- eclipse-cdt.spec	16 Oct 2008 19:22:09 -0000	1.112
+++ eclipse-cdt.spec	6 Nov 2008 23:57:20 -0000	1.113
@@ -98,6 +98,11 @@
 # is used instead of last configuration with id.
 Patch15: %{name}-managedConfigurations.patch
 
+# Following is actual patch for managed configuration dialog creating
+# extraneous default configurations with same id as user-modified ones in
+# the .cproject file.  This patch prevents the problem.
+Patch16: %{name}-managedConfigurations-fix.patch
+
 BuildRequires: eclipse-pde
 BuildRequires: eclipse-mylyn >= 3.0
 %if %{gcj_support}
@@ -188,6 +193,12 @@
 %patch15
 popd
 
+# Following is actual patch for problem whereby managed configurations dialog
+# creating extraneous default configurations with same id as user-defined ones
+pushd results/plugins/org.eclipse.cdt.ui
+%patch16
+popd
+
 # Only build the sdk
 offset=0; 
 for line in $(grep -no "value=.*platform" build.xml); do
@@ -571,6 +582,10 @@
 %endif
 
 %changelog
+* Thu Nov 06 2008 Jeff Johnston <jjohnstn at redhat.com> 5.0.0-11
+- Fix managed configurations dialog problem.
+- Update libhover and autotools source tarballs to 20081106 snapshot.
+
 * Thu Oct 16 2008 Jeff Johnston <jjohnstn at redhat.com> 5.0.0-10
 - Change runtests section to remove new libhover plugin rather than old
   com.redhat.* autotools plugin.


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/eclipse-cdt/devel/sources,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- sources	15 Oct 2008 23:08:47 -0000	1.48
+++ sources	6 Nov 2008 23:57:20 -0000	1.49
@@ -1,5 +1,5 @@
 5c470fb0777d27541edbfa31443d91f7  eclipse-cdt-cppunit-20061102.tar.gz
 2d4ae0a2131ba1efc896d981072cc091  eclipse-cdt-target_filter.gif.gz
 8958a138a5d96c9c1fa892e895b29bcd  eclipse-cdt-fetched-src-CDT_5_0_0.tar.bz2
-97035338f49f40212ad411ee43065939  eclipse-cdt-fetched-src-autotools-1_0_1.tar.gz
-3c0f7f6b7d1686e5aa360762b6c8b379  eclipse-cdt-fetched-src-libhover-1_0_0.tar.gz
+7bdfc7cfe88e694903225a858d3442c3  eclipse-cdt-fetched-src-autotools-20081106.tar.gz
+621bd568fed245c8368819692a066be9  eclipse-cdt-fetched-src-libhover-20081106.tar.gz




More information about the fedora-extras-commits mailing list