Commit f911b8e6 authored by Bonita CI's avatar Bonita CI

Merge branch 'MasterBugFixing' into 'master'

parents 2009e5ce 090cacd7
......@@ -28,6 +28,7 @@
</slideShowImageList>
<requestedExecutionLevel>asInvoker</requestedExecutionLevel>
<singleInstanceCheck>1</singleInstanceCheck>
<overrideGtkButtonText>1</overrideGtkButtonText>
<allowedLanguages>en es fr de it pt_BR ja ru</allowedLanguages>
<customLanguageFileList>
<language>
......@@ -491,7 +492,7 @@ ${msg(retrieve.workspace.message.warning)}
<value>true</value>
</option>
</optionList>
<postShowPageActionList>
<postShowPageActionList>
<setInstallerVariable>
<name>java_executable</name>
<value>${installdir}/jre/bin/java.exe</value>
......@@ -605,7 +606,7 @@ ${msg(workspace.location.explanation.end)}</explanation>
<actionList>
<runProgram>
<program>${java_executable}</program>
<programArguments>"-Xmx512m -XX:MaxPermSize=512m -jar "${installdir}/plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar" -product org.bonitasoft.studio.workspaceRecovery -application org.bonitasoft.studio.application.WorkspaceRecovery -data "${Oldworkspace}/workspace/" -newWorkspaceLocation "${installdir}/workspace" -noSplash</programArguments>
<programArguments>-Xmx512m -XX:MaxPermSize=512m -jar "${installdir}/plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar" -product org.bonitasoft.studio.workspaceRecovery -application org.bonitasoft.studio.application.WorkspaceRecovery -data "${Oldworkspace}/workspace/" -newWorkspaceLocation "${installdir}/workspace" -noSplash</programArguments>
<progressText>${msg(workspace.recovery.progressMessage)}</progressText>
<ruleList>
<platformTest>
......
......@@ -9,7 +9,6 @@
<version>7.1.0-SNAPSHOT</version>
</parent>
<groupId>org.bonitasoft.studio</groupId>
<artifactId>all-in-one</artifactId>
<packaging>eclipse-repository</packaging>
......
......@@ -521,6 +521,14 @@
version="1.7.0.v201011041433"
unpack="false"/>
<plugin
id="org.bonitasoft.studio.connectors.database.drivers.prop"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>
<plugin
id="org.bonitasoft.studio.businessobject"
download-size="0"
......
......@@ -42,18 +42,6 @@ private org.bonitasoft.studio.common.diagram.palette.CustomToolPaletteViewer too
* @generated BonitaSoft
*/
private static org.eclipse.gef.ui.palette.PaletteViewerPreferences processPref;
static{
if(processPref == null){
processPref = new org.eclipse.gef.ui.palette.DefaultPaletteViewerPreferences(){
public int getLayoutSetting() {
return getPreferenceStore().getInt(org.eclipse.gef.ui.palette.PaletteViewerPreferences.PREFERENCE_LAYOUT+preferencesKey);
}
public void setLayoutSetting(int newVal) {
getPreferenceStore().setValue(org.eclipse.gef.ui.palette.PaletteViewerPreferences.PREFERENCE_LAYOUT+preferencesKey, newVal);
}
};
}
}
«ENDAROUND»
«AROUND createPaletteRoot FOR gmfgen::Palette-»
......@@ -621,6 +609,17 @@ TODO: get it fixed in GMF-Runtime«ENDREM»
* @generated BonitaSoft
*/
protected org.eclipse.gef.ui.palette.PaletteViewer constructPaletteViewer() {
if(processPref == null){
processPref = new org.eclipse.gef.ui.palette.DefaultPaletteViewerPreferences(){
public int getLayoutSetting() {
return getPreferenceStore().getInt(org.eclipse.gef.ui.palette.PaletteViewerPreferences.PREFERENCE_LAYOUT+preferencesKey);
}
public void setLayoutSetting(int newVal) {
getPreferenceStore().setValue(org.eclipse.gef.ui.palette.PaletteViewerPreferences.PREFERENCE_LAYOUT+preferencesKey, newVal);
}
};
}
final org.bonitasoft.studio.common.diagram.palette.CustomMainPaletteViewer constructPaletteViewer = new org.bonitasoft.studio.common.diagram.palette.CustomMainPaletteViewer();
constructPaletteViewer.hidePaletteEntry("standardGroup");
constructPaletteViewer.setPaletteViewerPreferences(processPref);
......
/*
* Copyright (C) 2009 BonitaSoft S.A.
* BonitaSoft, 31 rue Gustave Eiffel - 38000 Grenoble
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.0 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
«EXTENSION xpt::editor::Utils»
«EXTENSION xpt::GenAuditRoot»
«AROUND createMarkersForStatus FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
private static void createMarkers(
«IF editorGen.application = null»org.eclipse.core.resources.IFile
«ELSE»org.eclipse.gmf.runtime.notation.View«ENDIF» target,
org.eclipse.core.runtime.IStatus validationStatus,
org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart diagramEditPart) {
if (validationStatus.isOK()) {
return;
}
final org.eclipse.core.runtime.IStatus rootStatus = validationStatus;
java.util.List allStatuses = new java.util.ArrayList();
«getDiagramEditorUtilQualifiedClassName()».LazyElement2ViewMap element2ViewMap = new «getDiagramEditorUtilQualifiedClassName()».LazyElement2ViewMap(
diagramEditPart.getDiagramView(),
collectTargetElements(rootStatus, new «EXPAND CodeStyle::G('java.util.HashSet', 'org.eclipse.emf.ecore.EObject')»(), allStatuses));
final java.util.List<org.bonitasoft.studio.common.Triple<String, String, String>> createdMarkers = new java.util.ArrayList<org.bonitasoft.studio.common.Triple<String,String,String>>();
for (java.util.Iterator it = allStatuses.iterator(); it.hasNext();) {
org.eclipse.emf.validation.model.IConstraintStatus nextStatus =
(org.eclipse.emf.validation.model.IConstraintStatus) it.next();
String constraintId = nextStatus.getConstraint().getDescriptor().getId();
org.eclipse.gmf.runtime.notation.View view = «getDiagramEditorUtilQualifiedClassName()».findView(
diagramEditPart, nextStatus.getTarget(), element2ViewMap);
final org.bonitasoft.studio.common.Triple<String, String, String> triple = new org.bonitasoft.studio.common.Triple<String, String, String>(constraintId, nextStatus.getMessage(),view.eResource().getURIFragment(view));
if(!createdMarkers.contains(triple)){
addMarker(constraintId,diagramEditPart.getViewer(), target, view.eResource().getURIFragment(view),
org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil.getQualifiedName(nextStatus.getTarget(), true),
nextStatus.getMessage(), nextStatus.getSeverity());
createdMarkers.add(triple);
}
}
}
«ENDAROUND»
«AROUND createMarkersForDiagnostic FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
private static void createMarkers(
«IF editorGen.application = null»org.eclipse.core.resources.IFile
«ELSE»org.eclipse.gmf.runtime.notation.View«ENDIF» target,
org.eclipse.emf.common.util.Diagnostic emfValidationStatus,
org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart diagramEditPart) {
if (emfValidationStatus.getSeverity() == org.eclipse.emf.common.util.Diagnostic.OK) {
return;
}
final org.eclipse.emf.common.util.Diagnostic rootStatus = emfValidationStatus;
java.util.List allDiagnostics = new java.util.ArrayList();
«getDiagramEditorUtilQualifiedClassName()».LazyElement2ViewMap element2ViewMap =
new «getDiagramEditorUtilQualifiedClassName()».LazyElement2ViewMap(
diagramEditPart.getDiagramView(),
collectTargetElements(rootStatus, new «EXPAND CodeStyle::G('java.util.HashSet', 'org.eclipse.emf.ecore.EObject')»(), allDiagnostics));
for (java.util.Iterator it = emfValidationStatus.getChildren().iterator(); it.hasNext();) {
org.eclipse.emf.common.util.Diagnostic nextDiagnostic = (org.eclipse.emf.common.util.Diagnostic) it.next();
java.util.List data = nextDiagnostic.getData();
if (data != null && !data.isEmpty() && data.get(0) instanceof org.eclipse.emf.ecore.EObject) {
org.eclipse.emf.ecore.EObject element = (org.eclipse.emf.ecore.EObject) data.get(0);
org.eclipse.gmf.runtime.notation.View view = «getDiagramEditorUtilQualifiedClassName()».findView(
diagramEditPart, element, element2ViewMap);
addMarker(null,diagramEditPart.getViewer(), target, view.eResource().getURIFragment(view),
org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil.getQualifiedName(element, true),
nextDiagnostic.getMessage(), diagnosticToStatusSeverity(nextDiagnostic.getSeverity()));
}
}
}
«ENDAROUND»
«AROUND addMarker FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
private static void addMarker(String constaintId,org.eclipse.gef.EditPartViewer viewer,
«IF editorGen.application = null»org.eclipse.core.resources.IFile
«ELSE»org.eclipse.gmf.runtime.notation.View«ENDIF» target,
String elementId, String location, String message, int statusSeverity) {
if (target == null) {
return;
}
«IF editorGen.application = null-»
«getMarkerNavigationProviderQualifiedClassName()».addMarker(constaintId,
target, elementId, location, message, statusSeverity);
«ELSE-»
new «EXPAND xpt::editor::ValidationMarker::qualifiedClassName»(
location, message, statusSeverity).add(viewer, elementId);
«ENDIF-»
}
«ENDAROUND»
/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Dmitry Stadnik (Borland) - initial API and implementation
*/
«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
«DEFINE MarkerNavigationProvider FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::copyright FOR editorGen-»
package «providersPackageName»;
«EXPAND xpt::Common::generatedClassComment»
public class «markerNavigationProviderClassName»
extends org.eclipse.gmf.runtime.emf.ui.providers.marker.AbstractModelMarkerNavigationProvider {
public static final String CONSTRAINT_ID = "constraintId";
«EXPAND xpt::Common::generatedMemberComment»
public static final String MARKER_TYPE =
«editorGen.plugin.getActivatorQualifiedClassName()».ID + ".«getValidationDiagnosticMarkerType()»"; «EXPAND xpt::Common::nonNLS»
«EXPAND xpt::Common::generatedMemberComment»
protected void doGotoMarker(org.eclipse.core.resources.IMarker marker) {
String elementId = marker.getAttribute(org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, null);
if (elementId == null || !(getEditor() instanceof org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor)) {
return;
}
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor editor =
(org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor) getEditor();
java.util.Map editPartRegistry = editor.getDiagramGraphicalViewer().getEditPartRegistry();
org.eclipse.emf.ecore.EObject targetView = editor.getDiagram().eResource().getEObject(elementId);
if (targetView == null) {
return;
}
org.eclipse.gef.EditPart targetEditPart = (org.eclipse.gef.EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
«getDiagramEditorUtilQualifiedClassName()».selectElementsInDiagram(
editor, java.util.Arrays.asList(new org.eclipse.gef.EditPart[] { targetEditPart }));
}
}
«EXPAND xpt::Common::generatedMemberComment»
public static void deleteMarkers(org.eclipse.core.resources.IResource resource) {
try {
resource.deleteMarkers(MARKER_TYPE, true, org.eclipse.core.resources.IResource.DEPTH_ZERO);
} catch (org.eclipse.core.runtime.CoreException e) {
«editorGen.plugin.getActivatorQualifiedClassName()».getInstance().logError(
"Failed to delete validation markers", e); «EXPAND xpt::Common::nonNLS»
}
}
«EXPAND xpt::Common::generatedMemberComment»
public static org.eclipse.core.resources.IMarker addMarker(String constraintId, org.eclipse.core.resources.IFile file,
String elementId, String location, String message, int statusSeverity) {
org.eclipse.core.resources.IMarker marker = null;
try {
marker = file.createMarker(MARKER_TYPE);
marker.setAttribute(org.eclipse.core.resources.IMarker.MESSAGE, message);
marker.setAttribute(org.eclipse.core.resources.IMarker.LOCATION, location);
marker.setAttribute(CONSTRAINT_ID, constraintId);
marker.setAttribute(org.eclipse.gmf.runtime.common.ui.resources.IMarker.ELEMENT_ID, elementId);
int markerSeverity = org.eclipse.core.resources.IMarker.SEVERITY_INFO;
if (statusSeverity == org.eclipse.core.runtime.IStatus.WARNING) {
markerSeverity = org.eclipse.core.resources.IMarker.SEVERITY_WARNING;
} else if (statusSeverity == org.eclipse.core.runtime.IStatus.ERROR ||
statusSeverity == org.eclipse.core.runtime.IStatus.CANCEL) {
markerSeverity = org.eclipse.core.resources.IMarker.SEVERITY_ERROR;
}
marker.setAttribute(org.eclipse.core.resources.IMarker.SEVERITY, markerSeverity);
} catch (org.eclipse.core.runtime.CoreException e) {
«editorGen.plugin.getActivatorQualifiedClassName()».getInstance().logError(
"Failed to create validation marker", e); «EXPAND xpt::Common::nonNLS»
}
return marker;
}
«EXPAND additions-»
}
«ENDDEFINE»
«DEFINE additions FOR gmfgen::GenDiagram»«ENDDEFINE»
......@@ -256,14 +256,14 @@ public class «validationDecoratorProviderClassName»
imageName = org.eclipse.ui.ISharedImages.IMG_OBJS_ERROR_TSK;
break;
case org.eclipse.core.resources.IMarker.SEVERITY_WARNING:
imageName = org.eclipse.ui.ISharedImages.IMG_OBJS_ERROR_TSK;
imageName = org.eclipse.ui.ISharedImages.IMG_OBJS_WARN_TSK;
break;
«ELSE-»
case org.eclipse.core.runtime.IStatus.ERROR:
imageName = org.eclipse.ui.ISharedImages.IMG_OBJS_ERROR_TSK;
break;
case org.eclipse.core.runtime.IStatus.WARNING:
imageName = org.eclipse.ui.ISharedImages.IMG_OBJS_ERROR_TSK;
imageName = org.eclipse.ui.ISharedImages.IMG_OBJS_WARN_TSK;
break;
«ENDIF-»
default:
......
/*
* Copyright (C) 2009 BonitaSoft S.A.
* BonitaSoft, 31 rue Gustave Eiffel - 38000 Grenoble
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.0 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
«EXTENSION xpt::editor::Utils»
«EXTENSION xpt::GenAuditRoot»
«AROUND createMarkersForStatus FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
private static void createMarkers(
«IF editorGen.application = null»org.eclipse.core.resources.IFile
«ELSE»org.eclipse.gmf.runtime.notation.View«ENDIF» target,
org.eclipse.core.runtime.IStatus validationStatus,
org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart diagramEditPart) {
if (validationStatus.isOK()) {
return;
}
final org.eclipse.core.runtime.IStatus rootStatus = validationStatus;
java.util.List allStatuses = new java.util.ArrayList();
«getDiagramEditorUtilQualifiedClassName()».LazyElement2ViewMap element2ViewMap = new «getDiagramEditorUtilQualifiedClassName()».LazyElement2ViewMap(
diagramEditPart.getDiagramView(),
collectTargetElements(rootStatus, new «EXPAND CodeStyle::G('java.util.HashSet', 'org.eclipse.emf.ecore.EObject')»(), allStatuses));
final java.util.List<org.bonitasoft.studio.common.Triple<String, String, String>> createdMarkers = new java.util.ArrayList<org.bonitasoft.studio.common.Triple<String,String,String>>();
for (java.util.Iterator it = allStatuses.iterator(); it.hasNext();) {
org.eclipse.emf.validation.model.IConstraintStatus nextStatus =
(org.eclipse.emf.validation.model.IConstraintStatus) it.next();
String constraintId = nextStatus.getConstraint().getDescriptor().getId();
org.eclipse.gmf.runtime.notation.View view = «getDiagramEditorUtilQualifiedClassName()».findView(
diagramEditPart, nextStatus.getTarget(), element2ViewMap);
final org.bonitasoft.studio.common.Triple<String, String, String> triple = new org.bonitasoft.studio.common.Triple<String, String, String>(constraintId, nextStatus.getMessage(),view.eResource().getURIFragment(view));
if(!createdMarkers.contains(triple)){
addMarker(constraintId,diagramEditPart.getViewer(), target, view.eResource().getURIFragment(view),
org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil.getQualifiedName(nextStatus.getTarget(), true),
nextStatus.getMessage(), nextStatus.getSeverity());
createdMarkers.add(triple);
}
}
}
«ENDAROUND»
«AROUND createMarkersForDiagnostic FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
private static void createMarkers(
«IF editorGen.application = null»org.eclipse.core.resources.IFile
«ELSE»org.eclipse.gmf.runtime.notation.View«ENDIF» target,
org.eclipse.emf.common.util.Diagnostic emfValidationStatus,
org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart diagramEditPart) {
if (emfValidationStatus.getSeverity() == org.eclipse.emf.common.util.Diagnostic.OK) {
return;
}
final org.eclipse.emf.common.util.Diagnostic rootStatus = emfValidationStatus;
java.util.List allDiagnostics = new java.util.ArrayList();
«getDiagramEditorUtilQualifiedClassName()».LazyElement2ViewMap element2ViewMap =
new «getDiagramEditorUtilQualifiedClassName()».LazyElement2ViewMap(
diagramEditPart.getDiagramView(),
collectTargetElements(rootStatus, new «EXPAND CodeStyle::G('java.util.HashSet', 'org.eclipse.emf.ecore.EObject')»(), allDiagnostics));
for (java.util.Iterator it = emfValidationStatus.getChildren().iterator(); it.hasNext();) {
org.eclipse.emf.common.util.Diagnostic nextDiagnostic = (org.eclipse.emf.common.util.Diagnostic) it.next();
java.util.List data = nextDiagnostic.getData();
if (data != null && !data.isEmpty() && data.get(0) instanceof org.eclipse.emf.ecore.EObject) {
org.eclipse.emf.ecore.EObject element = (org.eclipse.emf.ecore.EObject) data.get(0);
org.eclipse.gmf.runtime.notation.View view = «getDiagramEditorUtilQualifiedClassName()».findView(
diagramEditPart, element, element2ViewMap);
addMarker(null,diagramEditPart.getViewer(), target, view.eResource().getURIFragment(view),
org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil.getQualifiedName(element, true),
nextDiagnostic.getMessage(), diagnosticToStatusSeverity(nextDiagnostic.getSeverity()));
}
}
}
«ENDAROUND»
«AROUND addMarker FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
private static void addMarker(String constaintId,org.eclipse.gef.EditPartViewer viewer,
«IF editorGen.application = null»org.eclipse.core.resources.IFile
«ELSE»org.eclipse.gmf.runtime.notation.View«ENDIF» target,
String elementId, String location, String message, int statusSeverity) {
if (target == null) {
return;
}
«IF editorGen.application = null-»
«getMarkerNavigationProviderQualifiedClassName()».addMarker(constaintId,
target, elementId, location, message, statusSeverity);
«ELSE-»
new «EXPAND xpt::editor::ValidationMarker::qualifiedClassName»(
location, message, statusSeverity).add(viewer, elementId);
«ENDIF-»
}
«ENDAROUND»
«AROUND validate FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
private static void validate(org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart diagramEditPart,
org.eclipse.gmf.runtime.notation.View view) {
«IF editorGen.application = null-»
org.eclipse.core.resources.IFile target = view.eResource() != null ?
org.eclipse.emf.workspace.util.WorkspaceSynchronizer.getFile(view.eResource()) : null;
//if (target != null) {
// «getMarkerNavigationProviderQualifiedClassName()».deleteMarkers(target);
//}
«ELSE-»
org.eclipse.gmf.runtime.notation.View target = view;
«EXPAND xpt::editor::ValidationMarker::qualifiedClassName».removeAllMarkers(diagramEditPart.getViewer());
«ENDIF-»
org.eclipse.emf.common.util.Diagnostic diagnostic = runEMFValidator(view);
createMarkers(target, diagnostic, diagramEditPart);
org.eclipse.emf.validation.service.IBatchValidator validator =
(org.eclipse.emf.validation.service.IBatchValidator)
org.eclipse.emf.validation.service.ModelValidationService.getInstance().newValidator(
org.eclipse.emf.validation.model.EvaluationMode.BATCH);
validator.setIncludeLiveConstraints(true);
if (view.isSetElement() && view.getElement() != null) {
org.eclipse.core.runtime.IStatus status = validator.validate(view.getElement());
createMarkers(target, status, diagramEditPart);
}
«IF shouldRunValidateOnDiagram(editorGen.audits)-»
«IF hasDiagramElementTargetRule(editorGen.audits)-»
validator.setTraversalStrategy(«getValidationProviderQualifiedClassName()».getNotationTraversalStrategy(validator));
«ENDIF-»
org.eclipse.core.runtime.IStatus status = validator.validate(view);
createMarkers(target, status, diagramEditPart);
«ENDIF-»
«IF editorGen.application <> null and validationDecorators-»
«getValidationDecoratorProviderQualifiedClassName()».refreshDecorators(view);
for (java.util.Iterator it = view.eAllContents(); it.hasNext();) {
org.eclipse.emf.ecore.EObject next = (org.eclipse.emf.ecore.EObject) it.next();
if (next instanceof org.eclipse.gmf.runtime.notation.View) {
«getValidationDecoratorProviderQualifiedClassName()».refreshDecorators(
(org.eclipse.gmf.runtime.notation.View) next);
}
}
«ENDIF-»
}
«ENDAROUND»
/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Dmitry Stadnik (Borland) - initial API and implementation
*/
«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
«DEFINE MarkerNavigationProvider FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::copyright FOR editorGen-»
package «providersPackageName»;
«EXPAND xpt::Common::generatedClassComment»
public class «markerNavigationProviderClassName»
extends org.eclipse.gmf.runtime.emf.ui.providers.marker.AbstractModelMarkerNavigationProvider {
public static final String CONSTRAINT_ID = "constraintId";
«EXPAND xpt::Common::generatedMemberComment»
public static final String MARKER_TYPE =
«editorGen.plugin.getActivatorQualifiedClassName()».ID + ".«getValidationDiagnosticMarkerType()»"; «EXPAND xpt::Common::nonNLS»
«EXPAND xpt::Common::generatedMemberComment»
protected void doGotoMarker(org.eclipse.core.resources.IMarker marker) {
String elementId = marker.getAttribute(org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, null);
if (elementId == null || !(getEditor() instanceof org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor)) {
return;
}
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor editor =
(org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor) getEditor();
java.util.Map editPartRegistry = editor.getDiagramGraphicalViewer().getEditPartRegistry();
org.eclipse.emf.ecore.EObject targetView = editor.getDiagram().eResource().getEObject(elementId);
if (targetView == null) {
return;
}
org.eclipse.gef.EditPart targetEditPart = (org.eclipse.gef.EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
«getDiagramEditorUtilQualifiedClassName()».selectElementsInDiagram(
editor, java.util.Arrays.asList(new org.eclipse.gef.EditPart[] { targetEditPart }));
}
}
«EXPAND xpt::Common::generatedMemberComment»
public static void deleteMarkers(org.eclipse.core.resources.IResource resource) {
try {
resource.deleteMarkers(MARKER_TYPE, true, org.eclipse.core.resources.IResource.DEPTH_ZERO);
} catch (org.eclipse.core.runtime.CoreException e) {
«editorGen.plugin.getActivatorQualifiedClassName()».getInstance().logError(
"Failed to delete validation markers", e); «EXPAND xpt::Common::nonNLS»