Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ public void doSave(IProgressMonitor monitor) {

try {
final IFile dataFile = adei.getDataFile();
final String diagramFileString = dataFile.getLocationURI().getPath();
// final String diagramFileString = dataFile.getLocationURI().getPath(); // Does not work when the project is in Jazz SCM
final String diagramFileString = dataFile.getLocation().toOSString();
BpmnMemoryModel model = ModelHandler.getModel(EcoreUtil.getURI(getDiagramTypeProvider().getDiagram()));

// Save the bpmn diagram file
Expand Down Expand Up @@ -305,8 +306,8 @@ protected void fillContainerWithLanguage(FlowElementsContainer container, String

private void marshallImage(BpmnMemoryModel model, String modelFileName) {
try {
final GraphicalViewer graphicalViewer = (GraphicalViewer) ((DiagramEditor) model.getFeatureProvider().getDiagramTypeProvider().getDiagramEditor())
.getAdapter(GraphicalViewer.class);
final GraphicalViewer graphicalViewer = (GraphicalViewer) model.getFeatureProvider().getDiagramTypeProvider()
.getCurrentToolBehaviorProvider().getAdapter( GraphicalViewer.class );

if (graphicalViewer == null || graphicalViewer.getEditPartRegistry() == null) {
return;
Expand Down Expand Up @@ -414,7 +415,7 @@ protected void setInput(IEditorInput input) {
final BpmnMemoryModel model = new BpmnMemoryModel(getDiagramTypeProvider().getFeatureProvider(), dataFile);
ModelHandler.addModel(EcoreUtil.getURI(getDiagramTypeProvider().getDiagram()), model);

String filePath = dataFile.getLocationURI().getPath();
String filePath = dataFile.getLocation().toOSString();
File bpmnFile = new File(filePath);
try {
if (bpmnFile.exists() == false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public ActivitiEditorUpdateBehavior(final DiagramBehavior diagramBehavior) {
@Override
public TransactionalEditingDomain getEditingDomain() {
if (super.getEditingDomain() == null) {
createEditingDomain();
createEditingDomain(null);
}

return super.getEditingDomain();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private void extractPools(final List<Pool> pools) {
private BpmnMemoryModel buildModel(final IFile modelFile) {
final BpmnMemoryModel result = new BpmnMemoryModel(null, modelFile);

String filePath = modelFile.getLocationURI().getPath();
String filePath = modelFile.getLocation().toOSString();
File bpmnFile = new File(filePath);
try {
if (bpmnFile.exists()) {
Expand Down
6 changes: 3 additions & 3 deletions org.activiti.designer.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ This Agreement is governed by the laws of the State of New York and the intellec

<includes
id="org.eclipse.graphiti.feature"
version="0.11.4"/>
version="0.13.2"/>

<requires>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.core.runtime" version="3.7.0.v20110110" match="greaterOrEqual"/>
<import plugin="org.eclipse.graphiti" version="0.11.3" match="greaterOrEqual"/>
<import plugin="org.eclipse.graphiti.ui" version="0.11.3" match="greaterOrEqual"/>
<import plugin="org.eclipse.graphiti" version="0.13.2" match="greaterOrEqual"/>
<import plugin="org.eclipse.graphiti.ui" version="0.13.2" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.resources" version="3.7.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.views.properties.tabbed" version="3.5.100" match="greaterOrEqual"/>
<import plugin="org.eclipse.emf" version="2.6.0" match="greaterOrEqual"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ private Diagram getNewDiagram(final IProject project, final IFile targetFile) {
boolean createContent = PreferencesUtil.getBooleanPreference(
Preferences.EDITOR_ADD_DEFAULT_CONTENT_TO_DIAGRAMS, ActivitiPlugin.getDefault());

final ActivitiDiagramEditor diagramEditor
= (ActivitiDiagramEditor) getFeatureProvider().getDiagramTypeProvider().getDiagramEditor();
ActivitiDiagramEditor diagramEditor
= (ActivitiDiagramEditor) getFeatureProvider().getDiagramTypeProvider().getDiagramBehavior();

if (createContent) {
final InputStream contentStream = Util.getContentStream(Util.Content.NEW_SUBPROCESS_CONTENT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public void runModelChange(final Runnable runnable) {
if (pe != null) {
Object bo = getBusinessObject(pe);
if (bo instanceof ServiceTask || bo instanceof UserTask) {
DiagramEditor diagramEditor = (DiagramEditor) getDiagramEditor();
TransactionalEditingDomain editingDomain = diagramEditor.getEditingDomain();
DiagramEditor diagramEditor = (DiagramEditor) getDiagramContainer();
TransactionalEditingDomain editingDomain = diagramEditor.getEditingDomain();
ActivitiUiUtil.runModelChange(runnable, editingDomain, "Model Update");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void doSave(IProgressMonitor monitor) {

try {
final IFile dataFile = adei.getDataFile();
final String diagramFileString = dataFile.getLocationURI().getPath();
final String diagramFileString = dataFile.getLocation().toOSString();

File objectsFile = new File(diagramFileString);
FileWriter writer = new FileWriter(objectsFile);
Expand Down Expand Up @@ -138,7 +138,7 @@ protected void setInput(IEditorInput input) {
dataFile);
ModelHandler.addModel(EcoreUtil.getURI(getDiagramTypeProvider().getDiagram()), model);

String filePath = dataFile.getLocationURI().getPath();
String filePath = dataFile.getLocation().toOSString();
File formDefinitionFile = new File(filePath);
try {
if (formDefinitionFile.exists() == false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void doSave(IProgressMonitor monitor) {

try {
final IFile dataFile = adei.getDataFile();
final String diagramFileString = dataFile.getLocationURI().getPath();
final String diagramFileString = dataFile.getLocation().toOSString();

KickstartProcessMemoryModel model = ModelHandler.getKickstartProcessModel(EcoreUtil
.getURI(getDiagramTypeProvider().getDiagram()));
Expand Down Expand Up @@ -156,7 +156,7 @@ protected void setInput(IEditorInput input) {
.getFeatureProvider(), dataFile);
ModelHandler.addModel(EcoreUtil.getURI(getDiagramTypeProvider().getDiagram()), model);

String filePath = dataFile.getLocationURI().getPath();
String filePath = dataFile.getLocation().toOSString();
File kickstartProcessFile = new File(filePath);
try {
if (kickstartProcessFile.exists() == false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public KickstartProcessEditorUpdateBehavior(DiagramBehavior diagramBehavior) {
@Override
public TransactionalEditingDomain getEditingDomain() {
if (super.getEditingDomain() == null) {
createEditingDomain();
createEditingDomain(null);
}

return super.getEditingDomain();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ protected IStatus run(IProgressMonitor monitor) {
if ("kickproc".equalsIgnoreCase(unzippedFile.getFileExtension())) {
processFile = unzippedFile;
}
String filePath = unzippedFile.getLocationURI().getPath();
String filePath = unzippedFile.getLocation().toOSString();
File extractFile = new File(filePath);
FileOutputStream fos = new FileOutputStream(extractFile);
int len;
Expand Down Expand Up @@ -170,7 +170,7 @@ protected IFile processWorkflowDefinition(IFile sourceFile, IFolder unzippedFold
unzippedFolder.getFile(sourceFile.getName()).copy(sourceFile.getProject().getFullPath().append(sourceFile.getName()), true, new NullProgressMonitor());
IFile newProcessFile = sourceFile.getProject().getFile(sourceFile.getName());

String filePath = newProcessFile.getLocationURI().getPath();
String filePath = newProcessFile.getLocation().toOSString();
File processFile = new File(filePath);
FileInputStream fileStream = new FileInputStream(processFile);
AlfrescoSimpleWorkflowJsonConverter converter = new AlfrescoSimpleWorkflowJsonConverter();
Expand Down Expand Up @@ -212,7 +212,7 @@ public void run() {
definition.getParameters().put(SyncConstants.VERSION, document.getVersionLabel());

// Write
FileWriter writer = new FileWriter(new File(newProcessFile.getLocationURI().getPath()));
FileWriter writer = new FileWriter(new File(newProcessFile.getLocation().toOSString()));
converter.writeWorkflowDefinition(definition, writer);
newProcessFile.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ private static void updateKickstartProcessJson(IFile sourceFile, Document docume
workflowDefinition.getParameters().put(SyncConstants.VERSION, document.getVersionLabel());

// Write
FileWriter writer = new FileWriter(new File(sourceFile.getLocationURI().getPath()));
FileWriter writer = new FileWriter(new File(sourceFile.getLocation().toOSString()));
simpleWorkflowJsonConverter.writeWorkflowDefinition(workflowDefinition, writer);
sourceFile.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
}
Expand Down Expand Up @@ -290,7 +290,7 @@ protected static IFile downloadZipFile(IProject project, Document document, fina
if ("kickproc".equalsIgnoreCase(unzippedFile.getFileExtension())) {
processFile = unzippedFile;
}
String filePath = unzippedFile.getLocationURI().getPath();
String filePath = unzippedFile.getLocation().toOSString();
File extractFile = new File(filePath);
FileOutputStream fos = new FileOutputStream(extractFile);
int len;
Expand Down Expand Up @@ -324,7 +324,7 @@ protected static IFile processWorkflowDefinition(IFile sourceFile, IFolder unzip
unzippedFolder.getFile(sourceFile.getName()).copy(sourceFile.getProject().getFullPath().append(sourceFile.getName()), true, monitor);
IFile newProcessFile = sourceFile.getProject().getFile(sourceFile.getName());

String filePath = newProcessFile.getLocationURI().getPath();
String filePath = newProcessFile.getLocation().toOSString();
File processFile = new File(filePath);
FileInputStream fileStream = new FileInputStream(processFile);
AlfrescoSimpleWorkflowJsonConverter converter = new AlfrescoSimpleWorkflowJsonConverter();
Expand Down Expand Up @@ -366,7 +366,7 @@ public void run() {
definition.getParameters().put(SyncConstants.VERSION, document.getVersionLabel());

// Write
FileWriter writer = new FileWriter(new File(newProcessFile.getLocationURI().getPath()));
FileWriter writer = new FileWriter(new File(newProcessFile.getLocation().toOSString()));
converter.writeWorkflowDefinition(definition, writer);
newProcessFile.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);

Expand Down Expand Up @@ -429,7 +429,7 @@ protected static IContainer makeDirs(String filePath, IProject project, IProgres
}

protected static IFile createZipFile(final IFile sourceFile, final Shell shell) throws IOException, CoreException {
String filePath = sourceFile.getLocationURI().getPath();
String filePath = sourceFile.getLocation().toOSString();
File processFile = new File(filePath);
FileInputStream fileStream = new FileInputStream(processFile);
AlfrescoSimpleWorkflowJsonConverter converter = new AlfrescoSimpleWorkflowJsonConverter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ protected void flushControlValue(final Control control) {
protected void executeModelUpdater() {
// Make sure the update of the model is done in the transactional editing domain
// to allow for "undoing" changes
DiagramEditor diagramEditor = (DiagramEditor) getDiagramEditor();
TransactionalEditingDomain editingDomain = diagramEditor.getEditingDomain();
DiagramEditor diagramEditor = (DiagramEditor) getDiagramContainer();
TransactionalEditingDomain editingDomain = diagramEditor.getEditingDomain();

if(currentUpdater != null) {
// Do the actual changes to the business-object in a command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ protected void flushControlValue(final Control control) {
protected void executeModelUpdater() {
// Make sure the update of the model is done in the transactional editing domain
// to allow for "undoing" changes
DiagramEditor diagramEditor = (DiagramEditor) getDiagramEditor();
TransactionalEditingDomain editingDomain = diagramEditor.getEditingDomain();
DiagramEditor diagramEditor = (DiagramEditor) getDiagramContainer();
TransactionalEditingDomain editingDomain = diagramEditor.getEditingDomain();

if(currentUpdater != null) {
// Do the actual changes to the business-object in a command
Expand Down
17 changes: 16 additions & 1 deletion org.activiti.designer.parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
<profile>
<id>platform-luna</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>platform-version-name</name>
<value>luna</value>
Expand All @@ -62,6 +61,22 @@
<graphiti-site>http://download.eclipse.org/graphiti/updates/0.11.4</graphiti-site>
</properties>
</profile>
<profile>
<id>platform-neon</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>platform-version-name</name>
<value>neon</value>
</property>
</activation>
<properties>
<eclipse-site>http://download.eclipse.org/releases/neon</eclipse-site>
<platform-version>[4.6)</platform-version>
<platform-version-name>neon</platform-version-name>
<graphiti-site>http://download.eclipse.org/graphiti/updates/0.13.2</graphiti-site>
</properties>
</profile>
</profiles>

<modules>
Expand Down