[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [cdt-dev] CDT 2.0 M5 and Eclipse compatibility
|
Well, I didn't get much response from anyone other than our friend Ed. So,
sitting around today, I have managed to get CDT 2.0 up and running on the
latest Eclipse 3.0 nightly build. The fine people of the Eclipse Platform
have added some utilities that quickly convert plugins to make up for the
Eclipse platform changes. This works especially using PDE containers
(which I notice are working well in 2.1.2 but still have issues in 3.0). I
then ran into an API change where openEditor now requires the extension id
of the editor you want. Luckily there's a utility to find the default
editor for a given filename. Plus I ran into the usual use of internal
interfaces which disappeared but have good alternatives. All API change
effects were to org.eclipse.cdt.ui and I have attached a patch.
All in all, I was able to create a new project, create a new class with
the new class wizard, and debug with stop on main. I couldn't get
breakpoints to work. This was all with mingw.
In the end the changes weren't that bad but they do break compatibility
with 2.1.x.
So, do we go for it? Get on to 3.0 now. Or wait?
I vote go now. We have a ton of work to get the CDT working nicely on 3.0.
The sooner we start the better. Plus the latest 3.0 build seems to be
pretty stable despite the major changes to the platform.
Cheers,
Doug Schaefer, Senior Software Developer
IBM Rational Software, Ottawa, Ontario, Canada
Douglas Schaefer/Ottawa/IBM@IBMCA
Sent by: cdt-dev-admin@xxxxxxxxxxx
11/13/2003 09:59 AM
Please respond to
cdt-dev
To
cdt-dev@xxxxxxxxxxx
cc
Subject
RE: [cdt-dev] CDT 2.0 M5 and Eclipse compatibility
Good point, Ed,
This is certainly the objective (and why we are actually using the same
milestone numbers). And right now, CDT Head and the CDT 2.0M5 will run
with Eclipse 3.0M4. There has been a lot of API and plugin changes to 3.0
with the Rich Client Platform work and we just haven't got around to
keeping up and simply aren't going to be ready by the end of next week.
What this milestone for the CDT will give us is a number of important bug
fixes and compatibility with the Eclipse 3.0M4 build.
I'm also sure we're not the only component also going through this. This
is going to be the roughest point in the cycle for Eclipse 3.0 adoption
for everyone. It will take time. Once the API changes slow down, it'll be
a lot easier to keep in sync.
Cheers,
Doug Schaefer, Senior Software Developer
IBM Rational Software, Ottawa, Ontario, Canada
"Ed Burnette" <Ed.Burnette@xxxxxxx>
Sent by: cdt-dev-admin@xxxxxxxxxxx
11/13/2003 09:42 AM
Please respond to
cdt-dev
To
<cdt-dev@xxxxxxxxxxx>
cc
Subject
RE: [cdt-dev] CDT 2.0 M5 and Eclipse compatibility
I have a whole bunch of users who are just itching to use CDT again
(myself included) but can't because of the delays getting 3.0 supported.
Please reconsider tying the CDT builds directly with the Platform builds
and making CDT run on the very latest 3.0 streams. We have to use those
latest 3.0 streams for reasons I won't go into now and it's very
frustrating when CDT won't work with it.
I would recommend a simple rule: CDT HEAD should work with Platform HEAD,
with continuous integration. Does anyone else feel the same way?
--Ed
> -----Original Message-----
> From: Douglas Schaefer [mailto:dschaefe@xxxxxxxxxx]
> Sent: Wednesday, November 12, 2003 9:41 PM
> To: cdt-dev@xxxxxxxxxxx
> Subject: [cdt-dev] CDT 2.0 M5 and Eclipse compatibility
>
> ...I would recommend that we stay with 2.1.x compatibility for this
> milestone so that we have a stable snapshot of CDT 2.0 that people could
work
> with. After this is release, we should then immediately begin the
> migration to 3.0 to get this work under way.
>
> Thoughts?
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev
Index: .classpath
===================================================================
retrieving revision 1.7
diff -u -r1.7 .classpath
--- .classpath 15 Sep 2003 20:40:16 -0000 1.7
+++ .classpath 17 Nov 2003 02:10:44 -0000
@@ -1,17 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="src" path="utils.ui/"/>
- <classpathentry kind="src" path="/org.eclipse.ui"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.apache.xerces"/>
- <classpathentry kind="src" path="/org.eclipse.search"/>
- <classpathentry kind="src" path="/org.eclipse.compare"/>
- <classpathentry kind="src" path="/org.eclipse.debug.ui"/>
- <classpathentry kind="src" path="/org.eclipse.debug.core"/>
- <classpathentry kind="src" path="/org.eclipse.cdt.core"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="utils.ui"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
Index: .project
===================================================================
retrieving revision 1.2
diff -u -r1.2 .project
--- .project 28 Jun 2002 14:20:21 -0000 1.2
+++ .project 17 Nov 2003 02:10:44 -0000
@@ -3,16 +3,12 @@
<name>org.eclipse.cdt.ui</name>
<comment></comment>
<projects>
- <project>org.apache.xerces</project>
<project>org.eclipse.cdt.core</project>
- <project>org.eclipse.compare</project>
- <project>org.eclipse.core.boot</project>
- <project>org.eclipse.core.resources</project>
- <project>org.eclipse.core.runtime</project>
- <project>org.eclipse.debug.core</project>
- <project>org.eclipse.debug.ui</project>
- <project>org.eclipse.search</project>
- <project>org.eclipse.ui</project>
+ <project>org.eclipse.cdt.core.aix</project>
+ <project>org.eclipse.cdt.core.linux</project>
+ <project>org.eclipse.cdt.core.qnx</project>
+ <project>org.eclipse.cdt.core.solaris</project>
+ <project>org.eclipse.cdt.core.win32</project>
</projects>
<buildSpec>
<buildCommand>
Index: plugin.xml
===================================================================
retrieving revision 1.54
diff -u -r1.54 plugin.xml
--- plugin.xml 19 Oct 2003 01:17:40 -0000 1.54
+++ plugin.xml 17 Nov 2003 02:10:45 -0000
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
<plugin
id="org.eclipse.cdt.ui"
name="%pluginName"
@@ -12,6 +13,11 @@
</library>
</runtime>
<requires>
+ <import plugin="org.eclipse.ui.ide"/>
+ <import plugin="org.eclipse.ui.views"/>
+ <import plugin="org.eclipse.jface.text"/>
+ <import plugin="org.eclipse.ui.workbench.texteditor"/>
+ <import plugin="org.eclipse.ui.editors"/>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.apache.xerces"/>
@@ -336,7 +342,7 @@
</actionSet>
</extension>
<extension
- point="org.eclipse.ui.projectNatureImages">
+ point="org.eclipse.ui.ide.projectNatureImages">
<image
icon="icons/full/ovr16/c_ovr.gif"
natureId="org.eclipse.cdt.core.cnature"
Index: src/org/eclipse/cdt/internal/ui/search/GotoMarkerAction.java
===================================================================
retrieving revision 1.1
diff -u -r1.1 GotoMarkerAction.java
--- src/org/eclipse/cdt/internal/ui/search/GotoMarkerAction.java 28 Jun 2003 19:56:52 -0000 1.1
+++ src/org/eclipse/cdt/internal/ui/search/GotoMarkerAction.java 17 Nov 2003 02:10:49 -0000
@@ -27,6 +27,7 @@
import org.eclipse.search.ui.SearchUI;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.editors.text.TextEditor;
/**
* @author aniefer
@@ -73,8 +74,8 @@
} catch ( CoreException e ) {
//boo
}
- if( editor != null ){
- editor.gotoMarker( marker );
+ if( editor != null && editor instanceof TextEditor){
+ ((TextEditor)editor).gotoMarker( marker );
}
}
Index: src/org/eclipse/cdt/internal/ui/util/EditorUtility.java
===================================================================
retrieving revision 1.10
diff -u -r1.10 EditorUtility.java
--- src/org/eclipse/cdt/internal/ui/util/EditorUtility.java 28 Jun 2003 19:48:06 -0000 1.10
+++ src/org/eclipse/cdt/internal/ui/util/EditorUtility.java 17 Nov 2003 02:10:50 -0000
@@ -23,6 +23,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorInput;
@@ -109,7 +110,8 @@
if (file != null) {
IWorkbenchPage p= CUIPlugin.getActivePage();
if (p != null) {
- IEditorPart editorPart= p.openEditor(file, null, activate);
+ String editorId = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(file.getName()).getId();
+ IEditorPart editorPart= p.openEditor(new FileEditorInput(file), editorId, activate);
initializeHighlightRange(editorPart);
return editorPart;
}
Index: src/org/eclipse/cdt/internal/ui/wizards/dialogfields/LinkToFileGroup.java
===================================================================
retrieving revision 1.3
diff -u -r1.3 LinkToFileGroup.java
--- src/org/eclipse/cdt/internal/ui/wizards/dialogfields/LinkToFileGroup.java 3 Sep 2003 13:33:46 -0000 1.3
+++ src/org/eclipse/cdt/internal/ui/wizards/dialogfields/LinkToFileGroup.java 17 Nov 2003 02:10:51 -0000
@@ -40,7 +40,7 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.eclipse.ui.internal.dialogs.PathVariableSelectionDialog;
+import org.eclipse.ui.internal.ide.dialogs.PathVariableSelectionDialog;
/**
*/
@@ -358,7 +358,7 @@
if (linkTargetField == null || linkTargetField.isDisposed())
return createStatus(IStatus.OK, ""); //$NON-NLS-1$
- IWorkspace workspace = WorkbenchPlugin.getPluginWorkspace();
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
String linkTargetName = linkTargetField.getText();
IPath path = new Path(linkTargetName);
Index: src/org/eclipse/cdt/ui/wizards/CProjectWizard.java
===================================================================
retrieving revision 1.11
diff -u -r1.11 CProjectWizard.java
--- src/org/eclipse/cdt/ui/wizards/CProjectWizard.java 11 Sep 2003 20:44:26 -0000 1.11
+++ src/org/eclipse/cdt/ui/wizards/CProjectWizard.java 17 Nov 2003 02:10:52 -0000
@@ -41,7 +41,9 @@
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation;
+import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard;
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
@@ -188,8 +190,10 @@
if (dw != null) {
try {
IWorkbenchPage page = dw.getActivePage();
- if (page != null)
- page.openEditor(file);
+ if (page != null) {
+ String editorId = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(file.getName()).getId();
+ page.openEditor(new FileEditorInput(file), editorId);
+ }
} catch (PartInitException e) {
MessageDialog.openError(dw.getShell(),
CUIPlugin.getResourceString(OP_ERROR), e.getMessage());
Index: src/org/eclipse/cdt/ui/wizards/NewCProjectWizard.java
===================================================================
retrieving revision 1.1
diff -u -r1.1 NewCProjectWizard.java
--- src/org/eclipse/cdt/ui/wizards/NewCProjectWizard.java 18 Aug 2003 16:10:59 -0000 1.1
+++ src/org/eclipse/cdt/ui/wizards/NewCProjectWizard.java 17 Nov 2003 02:10:52 -0000
@@ -36,7 +36,9 @@
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation;
+import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard;
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
@@ -164,8 +166,10 @@
if (dw != null) {
try {
IWorkbenchPage page = dw.getActivePage();
- if (page != null)
- page.openEditor(file);
+ if (page != null) {
+ String editorId = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(file.getName()).getId();
+ page.openEditor(new FileEditorInput(file), editorId);
+ }
} catch (PartInitException e) {
MessageDialog.openError(dw.getShell(),
CUIPlugin.getResourceString(OP_ERROR), e.getMessage());
Index: src/org/eclipse/cdt/ui/wizards/NewClassWizard.java
===================================================================
retrieving revision 1.3
diff -u -r1.3 NewClassWizard.java
--- src/org/eclipse/cdt/ui/wizards/NewClassWizard.java 18 Sep 2003 19:46:12 -0000 1.3
+++ src/org/eclipse/cdt/ui/wizards/NewClassWizard.java 17 Nov 2003 02:10:52 -0000
@@ -19,6 +19,8 @@
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
/**
@@ -113,7 +115,8 @@
display.asyncExec(new Runnable() {
public void run() {
try {
- activePage.openEditor(resource);
+ String editorId = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(resource.getName()).getId();
+ activePage.openEditor(new FileEditorInput(resource), editorId);
} catch (PartInitException e) {
CUIPlugin.getDefault().log(e);
}