[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[bpel-dev] patch5=create-EMF-model-from-SSE-model
|
Hi Simon,
Please find the next patch for the MultiTab branch.
The main gain from it is that now EMF model is built
from SSE model, not from the source .bpel file. It means that BPELReader DOMParser
is not used anymore. However I didn’t remove the code for creating EMF
model from sources to make this patch not too big. Probably, I’ll remove
this code in the next patch.
The main trick was to pass the SSE model to the
BPELReader. I did it via loadOptions in BPELMultipageEditorPart.loadModel().
I’ve also applied the patch for https://bugs.eclipse.org/bugs/show_bug.cgi?id=188061
to avoid merging problems/questions with the main trunk later.
And I also did some code cleanup re creating tabs in BPELMultipageEditorPart.
Details.
- public void
read(Resource processResource, IDOMModel domModel, ResourceSet resourceSet)
was added to org.eclipse.bpel.ui.util.BPELReader.
It will replace public void read(Resource processResource, IFile
modelFile, ResourceSet resourceSet) later.
- public void
read(BPELResource resource, Document doc) was added to org.eclipse.bpel.model.resource.BPELReader.
It will replace read(BPELResource resource, InputStream inputStream) later.
- BPELResourceSetImpl
is used instead of ResourceSetImpl.
public void setLoadOptions (Map<Object, Object> options) was added to
BPELResourceSetImpl.
The package org.eclipse.bpel.common.ui depends on org.eclipse.bpel.model now.
Is it OK?
- Slight code cleanup
in BPELMultipageEditorPart.
- org.eclipse.bpel.common.ui.composite.EditorReference:
the patch for https://bugs.eclipse.org/bugs/show_bug.cgi?id=188061
was applied
Please apply the patch if you think it’s OK.
Thanks,
Vitaly.
|
### Eclipse Workspace Patch 1.0
#P org.eclipse.bpel.validator
Index: src/org/eclipse/bpel/validator/ModelQuery.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/ModelQuery.java,v
retrieving revision 1.1
diff -u -r1.1 ModelQuery.java
--- src/org/eclipse/bpel/validator/ModelQuery.java 11 Apr 2007 22:56:52 -0000 1.1
+++ src/org/eclipse/bpel/validator/ModelQuery.java 14 Jul 2007 14:42:17 -0000
@@ -329,7 +329,7 @@
// set it on all the children of this element as well.
//
- Iterator<Object> it = eObj.eAllContents();
+ Iterator<EObject> it = eObj.eAllContents();
while (it.hasNext()) {
Object next = it.next();
Index: .classpath
===================================================================
RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.validator/.classpath,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 .classpath
--- .classpath 31 May 2007 13:47:08 -0000 1.1.2.1
+++ .classpath 14 Jul 2007 14:42:16 -0000
@@ -4,5 +4,6 @@
<classpathentry kind="src" output="bin-jaxen" path="jaxen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="lib" path="C:/eclipse_20070222/plugins/javax.wsdl_1.4.0.v200705200900.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
#P org.eclipse.bpel.ui
Index: src/org/eclipse/bpel/ui/util/BPELReader.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/util/BPELReader.java,v
retrieving revision 1.2
diff -u -r1.2 BPELReader.java
--- src/org/eclipse/bpel/ui/util/BPELReader.java 17 Feb 2006 19:58:45 -0000 1.2
+++ src/org/eclipse/bpel/ui/util/BPELReader.java 14 Jul 2007 14:42:20 -0000
@@ -30,6 +30,7 @@
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
/**
@@ -149,6 +150,103 @@
}
}
+ /**
+ * Another public method for those who want to get the process resource
+ * by their own means (such as the editor).
+ */
+ public void read(Resource processResource, IDOMModel domModel, ResourceSet resourceSet) {
+ // TODO: These two lines are a workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72565
+ EcorePackage instance = EcorePackage.eINSTANCE;
+ instance.eAdapters();
+
+ this.processResource = processResource;
+
+ //IPath extensionsPath = modelFile.getFullPath().removeFileExtension().addFileExtension(IBPELUIConstants.EXTENSION_MODEL_EXTENSIONS);
+ org.eclipse.core.runtime.IPath extensionsPath
+ = (new org.eclipse.core.runtime.Path(domModel.getBaseLocation())).removeFileExtension().addFileExtension(IBPELUIConstants.EXTENSION_MODEL_EXTENSIONS);
+ URI extensionsUri = URI.createPlatformResourceURI(extensionsPath.toString());
+ IFile extensionsFile = ResourcesPlugin.getWorkspace().getRoot().getFile(extensionsPath);
+
+ try {
+ processResource.load(Collections.EMPTY_MAP);
+ EList contents = processResource.getContents();
+ if (!contents.isEmpty())
+ process = (Process) contents.get(0);
+ } catch (Exception e) {
+ // TODO: If a file is empty Resource.load(Map) throws a java.lang.NegativeArraySizeException
+ // We should investigate EMF to see if we are supposed to handle this case or if this
+ // is a bug in EMF.
+ BPELUIPlugin.log(e);
+ }
+ try {
+ extensionsResource = resourceSet.getResource(extensionsUri, extensionsFile.exists());
+ if (extensionsResource != null) {
+ extensionMap = ExtensionmodelFactory.eINSTANCE.findExtensionMap(
+ IBPELUIConstants.MODEL_EXTENSIONS_NAMESPACE, extensionsResource.getContents());
+ }
+ } catch (Exception e) {
+ BPELUIPlugin.log(e);
+ }
+ if (extensionMap != null) extensionMap.initializeAdapter();
+
+ if (process == null) {
+ process = BPELFactory.eINSTANCE.createProcess();
+ processResource.getContents().add(process);
+ }
+ if (extensionMap == null) {
+ extensionMap = ExtensionmodelFactory.eINSTANCE.createExtensionMap(IBPELUIConstants.MODEL_EXTENSIONS_NAMESPACE);
+ if (extensionsResource == null) {
+ extensionsResource = resourceSet.createResource(extensionsUri);
+ }
+ extensionsResource.getContents().clear();
+ extensionsResource.getContents().add(extensionMap);
+ }
+
+ // Make sure the Process has Variables, PartnerLinks and CorrelationSets objects.
+ // They aren't strictly necessary according to the spec but make we need those in
+ // order for the editor tray to work.
+ if (process.getVariables() == null) {
+ process.setVariables(BPELFactory.eINSTANCE.createVariables());
+ }
+ if (process.getPartnerLinks() == null) {
+ process.setPartnerLinks(BPELFactory.eINSTANCE.createPartnerLinks());
+ }
+ if (process.getCorrelationSets() == null) {
+ process.setCorrelationSets(BPELFactory.eINSTANCE.createCorrelationSets());
+ }
+ // Make sure scopes have Variables.
+ // They aren't strictly necessary according to the spec but make we need those in
+ // order for the editor tray to work.
+ for (Iterator iter = process.eAllContents(); iter.hasNext();) {
+ Object object = iter.next();
+ if (object instanceof Scope) {
+ Scope scope = (Scope)object;
+ if (scope.getVariables() == null) {
+ scope.setVariables(BPELFactory.eINSTANCE.createVariables());
+ }
+ if (scope.getPartnerLinks() == null) {
+ scope.setPartnerLinks(BPELFactory.eINSTANCE.createPartnerLinks());
+ }
+ if (scope.getCorrelationSets() == null) {
+ scope.setCorrelationSets(BPELFactory.eINSTANCE.createCorrelationSets());
+ }
+ }
+ }
+
+ // Make sure each model object has the necessary extensions!
+ TreeIterator it = process.eAllContents();
+ while (it.hasNext()) {
+ Object modelObject = it.next();
+ if (modelObject instanceof EObject) {
+ ModelHelper.createExtensionIfNecessary(extensionMap, (EObject)modelObject);
+ }
+ }
+
+ if (extensionMap.get(process) == null) {
+ ModelHelper.createExtensionIfNecessary(extensionMap, process);
+ }
+ }
+
public ExtensionMap getExtensionMap() {
return extensionMap;
}
Index: META-INF/MANIFEST.MF
===================================================================
RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF,v
retrieving revision 1.9.2.1
diff -u -r1.9.2.1 MANIFEST.MF
--- META-INF/MANIFEST.MF 31 May 2007 13:47:10 -0000 1.9.2.1
+++ META-INF/MANIFEST.MF 14 Jul 2007 14:42:19 -0000
@@ -23,7 +23,8 @@
org.eclipse.bpel.model,
org.eclipse.wst.xml.core,
org.eclipse.bpel.wsil.model,
- org.eclipse.wst.sse.ui
+ org.eclipse.wst.sse.ui,
+ org.eclipse.wst.sse.core
Eclipse-LazyStart: true
Export-Package: org.eclipse.bpel.ui,
org.eclipse.bpel.ui.actions,
Index: .classpath
===================================================================
RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.ui/.classpath,v
retrieving revision 1.3
diff -u -r1.3 .classpath
--- .classpath 18 Nov 2006 01:09:52 -0000 1.3
+++ .classpath 14 Jul 2007 14:42:19 -0000
@@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Index: src/org/eclipse/bpel/ui/BPELMultipageEditorPart.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Attic/BPELMultipageEditorPart.java,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 BPELMultipageEditorPart.java
--- src/org/eclipse/bpel/ui/BPELMultipageEditorPart.java 8 Jul 2007 15:58:00 -0000 1.1.2.3
+++ src/org/eclipse/bpel/ui/BPELMultipageEditorPart.java 14 Jul 2007 14:42:20 -0000
@@ -12,6 +12,8 @@
package org.eclipse.bpel.ui;
+import java.util.HashMap;
+
import org.eclipse.bpel.common.extension.model.ExtensionMap;
import org.eclipse.bpel.common.ui.editmodel.IEditModelListener;
import org.eclipse.bpel.common.ui.editmodel.ResourceInfo;
@@ -21,7 +23,6 @@
import org.eclipse.bpel.model.PartnerLink;
import org.eclipse.bpel.model.Process;
import org.eclipse.bpel.model.Variable;
-import org.eclipse.bpel.ui.BPELEditor.BPELEditorAdapter;
import org.eclipse.bpel.ui.editparts.ProcessTrayEditPart;
import org.eclipse.bpel.ui.editparts.util.OutlineTreePartFactory;
import org.eclipse.bpel.ui.properties.BPELPropertySection;
@@ -39,24 +40,20 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.LightweightSystem;
import org.eclipse.draw2d.Viewport;
import org.eclipse.draw2d.parts.ScrollableThumbnail;
import org.eclipse.draw2d.parts.Thumbnail;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.gef.ContextMenuProvider;
import org.eclipse.gef.DefaultEditDomain;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartViewer;
-import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gef.GraphicalViewer;
import org.eclipse.gef.LayerConstants;
import org.eclipse.gef.RootEditPart;
import org.eclipse.gef.commands.CommandStack;
-import org.eclipse.gef.editparts.ZoomManager;
import org.eclipse.gef.ui.actions.ActionRegistry;
import org.eclipse.gef.ui.parts.ContentOutlinePage;
import org.eclipse.gef.ui.parts.TreeViewer;
@@ -64,14 +61,10 @@
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.SWT;
@@ -85,7 +78,6 @@
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory;
@@ -96,15 +88,19 @@
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.part.IPageSite;
import org.eclipse.ui.part.MultiPageEditorPart;
-import org.eclipse.ui.part.MultiPageEditorSite;
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.tabbed.ISection;
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class BPELMultipageEditorPart extends MultiPageEditorPart
@@ -266,20 +262,6 @@
super();
setEditDomain(new BPELEditDomain(this));
}
- /**
- * Adds the source page of the multi-page editor.
- */
- private void addSourcePage() throws PartInitException {
- try
- {
- addPage(SOURCE_PAGE_INDEX, fTextEditor, getEditorInput());
- //FIXME I18N
- setPageText(SOURCE_PAGE_INDEX, "Source");
- firePropertyChange(PROP_TITLE);
- } catch (PartInitException e) {
- ErrorDialog.openError(getSite().getShell(), "Error creating nested text editor", null, e.getStatus()); //$NON-NLS-1$
- }
- }
/**
* Connects the design viewer with the viewer selection manager. Should be
@@ -320,10 +302,12 @@
}
if (selectedNodeElement != null) {
- int charStart = ((Number)selectedNodeElement.getUserData("location.charStart")).intValue();
+ StructuredSelection nodeSelection = new StructuredSelection(selectedNodeElement);
+ getTextEditor().getSelectionProvider().setSelection(nodeSelection);
+ //int charStart = ((Number)selectedNodeElement.getUserData("location.charStart")).intValue();
//-1 to point to the '<' literal
- TextSelection textSelection = new TextSelection(charStart - 1, 0);
- getTextEditor().getSelectionProvider().setSelection(textSelection);
+ //TextSelection textSelection = new TextSelection(charStart - 1, 0);
+ //getTextEditor().getSelectionProvider().setSelection(textSelection);
}
} catch (Exception e) {
e.printStackTrace();
@@ -333,36 +317,47 @@
});
}
- private void createAndAddDesignPage() {
+ /**
+ * Creates the design page of the multi-page editor.
+ */
+ private void createDesignPage() {
fDesignViewer = new BPELEditor(getEditDomain());
loadModel();
try
{
- addPage(DESIGN_PAGE_INDEX, fDesignViewer, getEditorInput());
+ addPage(0, fDesignViewer, getEditorInput());
//FIXME I18N
- setPageText(DESIGN_PAGE_INDEX, "Design");
- firePropertyChange(PROP_TITLE);
+ setPageText(0, "Design");
} catch (PartInitException e) {
- ErrorDialog.openError(getSite().getShell(), "Error creating nested BPEL editor", null, e.getStatus()); //$NON-NLS-1$
+ ErrorDialog.openError(getSite().getShell(), "Error creating Design page", null, e.getStatus()); //$NON-NLS-1$
}
}
- private void createSourcePage() {
+ /**
+ * Creates the source page of the multi-page editor.
+ */
+ private void createSourcePage() throws PartInitException {
fTextEditor = new StructuredTextEditor();
+ try
+ {
+ addPage(0, fTextEditor, getEditorInput());
+ //FIXME I18N
+ setPageText(0, "Source");
+ } catch (PartInitException e) {
+ ErrorDialog.openError(getSite().getShell(), "Error creating Source page", null, e.getStatus()); //$NON-NLS-1$
+ }
}
-
/**
* Creates the pages of this multi-page editor.
*/
protected void createPages() {
- // source page must be created before design page
-
try {
+ // source page must be created before design page
createSourcePage();
- createAndAddDesignPage();
- addSourcePage();
+ createDesignPage();
+ firePropertyChange(PROP_TITLE);
connectDesignPage();
initializeFileChangeListener();
initializeRefactoringListener();
@@ -829,8 +824,31 @@
}
private void loadModel() {
+ Document structuredDocument = null;
+
+ try {
+ IDocument doc = fTextEditor.getDocumentProvider().getDocument(getEditorInput());
+ if (doc instanceof IStructuredDocument) {
+ IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForEdit(doc);
+ if (model == null) {
+ model = StructuredModelManager.getModelManager().getModelForEdit((IStructuredDocument) doc);
+ }
+ if (model != null) {
+ structuredDocument = ((IDOMModel) model).getDocument();
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ HashMap loadOptions = null;
+ if (structuredDocument != null) {
+ loadOptions = new HashMap (1);
+ loadOptions.put("DOMDocument", structuredDocument);
+ }
+
//FIXME WSDLEditor has gef command stack; in order to have gef command stack we need to add design page first
- BPELEditModelClient editModelClient = new BPELEditModelClient(this, ((IFileEditorInput) getEditorInput()).getFile(), this, null);
+ BPELEditModelClient editModelClient = new BPELEditModelClient(this, ((IFileEditorInput) getEditorInput()).getFile(), this, loadOptions);
fDesignViewer.setEditModelClient(editModelClient);
getEditDomain().setCommandStack(editModelClient.getCommandStack());
#P org.eclipse.bpel.model
Index: src/org/eclipse/bpel/model/resource/BPELResourceSetImpl.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource/BPELResourceSetImpl.java,v
retrieving revision 1.3
diff -u -r1.3 BPELResourceSetImpl.java
--- src/org/eclipse/bpel/model/resource/BPELResourceSetImpl.java 10 May 2007 23:12:32 -0000 1.3
+++ src/org/eclipse/bpel/model/resource/BPELResourceSetImpl.java 14 Jul 2007 14:42:25 -0000
@@ -126,5 +126,8 @@
return resource;
}
+ public void setLoadOptions (Map<Object, Object> options) {
+ loadOptions = options;
+ }
}
Index: src/org/eclipse/bpel/model/resource/BPELReader.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource/BPELReader.java,v
retrieving revision 1.30
diff -u -r1.30 BPELReader.java
--- src/org/eclipse/bpel/model/resource/BPELReader.java 20 Apr 2007 23:31:44 -0000 1.30
+++ src/org/eclipse/bpel/model/resource/BPELReader.java 14 Jul 2007 14:42:24 -0000
@@ -122,6 +122,26 @@
this.domParser = parser;
}
+ public BPELReader () {
+ }
+
+ /**
+ * Read from the given Document into the given resource.
+ *
+ * @param resource the EMF resource to construct
+ * @param Document the document to read the BPEL from
+ */
+ public void read(BPELResource resource, Document doc) {
+ this.resource = resource;
+ // Pass 1 and 2 are inside the try so they don't occur if
+ // an error happens during parsing.
+ // In pass 1 we parse and create the structural elements and attributes.
+ pass1(doc);
+ // In pass 2, we run any postLoadRunnables which need to happen after
+ // pass 1 (for example, establishing object links to variables).
+ pass2();
+ }
+
/**
* Read from the given input stream into the given resource.
*
@@ -3027,7 +3047,11 @@
}
- /**
+ public Process getProcess () {
+ return process;
+ }
+
+ /**
* Helper method to get a string from the given text node or CDATA text node.
*/
private String getText (Node node) {
Index: src/org/eclipse/bpel/model/resource/BPELResourceImpl.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/resource/BPELResourceImpl.java,v
retrieving revision 1.3
diff -u -r1.3 BPELResourceImpl.java
--- src/org/eclipse/bpel/model/resource/BPELResourceImpl.java 11 Apr 2007 21:20:25 -0000 1.3
+++ src/org/eclipse/bpel/model/resource/BPELResourceImpl.java 14 Jul 2007 14:42:25 -0000
@@ -45,6 +45,7 @@
import org.eclipse.xsd.util.XSDConstants;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
+import org.w3c.dom.Document;
import org.xml.sax.EntityResolver;
import org.xml.sax.ErrorHandler;
@@ -160,15 +161,22 @@
// BPELReader reader = new BPELReader(getDocumentBuilder());
BPELReader reader = null;
- try {
- reader = new BPELReader( getDOMParser() );
- } catch (IOException ioe) {
- throw ioe;
- } catch (Exception ex) {
- throw new IOException("Problem create parser");
- }
+ Document document = null;
- reader.read(this, inputStream);
+ if (options != null
+ && (document = (org.w3c.dom.Document)options.get("DOMDocument")) != null) {
+ reader = new BPELReader();
+ reader.read(this, document);
+ } else {
+ try {
+ reader = new BPELReader( getDOMParser() );
+ } catch (IOException ioe) {
+ throw ioe;
+ } catch (Exception ex) {
+ throw new IOException("Problem create parser");
+ }
+ reader.read(this, inputStream);
+ }
setNamespaceURI(BPELConstants.NAMESPACE);
}
#P org.eclipse.bpel.common.ui
Index: src/org/eclipse/bpel/common/ui/editmodel/EditModel.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.common.ui/src/org/eclipse/bpel/common/ui/editmodel/EditModel.java,v
retrieving revision 1.1
diff -u -r1.1 EditModel.java
--- src/org/eclipse/bpel/common/ui/editmodel/EditModel.java 29 Nov 2005 18:50:34 -0000 1.1
+++ src/org/eclipse/bpel/common/ui/editmodel/EditModel.java 14 Jul 2007 14:42:27 -0000
@@ -19,6 +19,8 @@
import java.util.List;
import java.util.Map;
+import org.eclipse.bpel.model.resource.BPELResourceSetImpl;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -360,7 +362,7 @@
if(resourceSet != null)
return resourceSet;
// TODO: Extensibility
- resourceSet = new ResourceSetImpl();
+ resourceSet = new BPELResourceSetImpl();
fileToResourceSet.put(primaryFile,resourceSet);
return resourceSet;
}
Index: src/org/eclipse/bpel/common/ui/editmodel/EditModelClient.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.common.ui/src/org/eclipse/bpel/common/ui/editmodel/EditModelClient.java,v
retrieving revision 1.1
diff -u -r1.1 EditModelClient.java
--- src/org/eclipse/bpel/common/ui/editmodel/EditModelClient.java 29 Nov 2005 18:50:34 -0000 1.1
+++ src/org/eclipse/bpel/common/ui/editmodel/EditModelClient.java 14 Jul 2007 14:42:27 -0000
@@ -13,6 +13,7 @@
import java.io.IOException;
import java.util.Map;
+import org.eclipse.bpel.model.resource.BPELResourceSetImpl;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -53,6 +54,7 @@
SynchronizationHandler handler = new Synchronizer();
this.editor = editor;
editModel = getSharedResourceSet(file);
+ ((BPELResourceSetImpl)editModel.getResourceSet()).setLoadOptions(loadOptions);
try {
if(getCommandStack() == null) {
EditModelCommandStack commandStack = createCommandStack();
Index: src/org/eclipse/bpel/common/ui/composite/EditorReference.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.common.ui/src/org/eclipse/bpel/common/ui/composite/EditorReference.java,v
retrieving revision 1.1
diff -u -r1.1 EditorReference.java
--- src/org/eclipse/bpel/common/ui/composite/EditorReference.java 29 Nov 2005 18:50:34 -0000 1.1
+++ src/org/eclipse/bpel/common/ui/composite/EditorReference.java 14 Jul 2007 14:42:27 -0000
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.bpel.common.ui.composite;
+import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -70,4 +71,14 @@
public IEditorInput getEditorInput() throws PartInitException {
return null;
}
+
+ public void addPartPropertyListener(IPropertyChangeListener listener) {
+ }
+
+ public String getPartProperty(String key) {
+ return null;
+ }
+
+ public void removePartPropertyListener(IPropertyChangeListener listener) {
+ }
}
\ No newline at end of file
Index: META-INF/MANIFEST.MF
===================================================================
RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.common.ui/META-INF/MANIFEST.MF,v
retrieving revision 1.8
diff -u -r1.8 MANIFEST.MF
--- META-INF/MANIFEST.MF 23 Apr 2007 18:39:06 -0000 1.8
+++ META-INF/MANIFEST.MF 14 Jul 2007 14:42:26 -0000
@@ -10,7 +10,8 @@
org.eclipse.ui.ide,
org.eclipse.core.resources,
org.eclipse.gef,
- org.eclipse.emf.ecore.change
+ org.eclipse.emf.ecore.change,
+ org.eclipse.bpel.model
Eclipse-LazyStart: true
Export-Package: org.eclipse.bpel.common.ui,
org.eclipse.bpel.common.ui.assist,