| author | Rainer Pielmann | 2012-01-31 07:22:58 (EST) |
|---|---|---|
| committer | Stephan Born | 2012-04-24 04:29:55 (EDT) |
| commit | 37d08156e971bb8b1529eedc378012977b440175 (patch) (side-by-side diff) | |
| tree | e862da93a531cfd1fc01912c60ca0df561b2d723 | |
| parent | 2d289bec1c8805d3f52ce62d37c919863cf35ec0 (diff) | |
| download | org.eclipse.stardust.ide-37d08156e971bb8b1529eedc378012977b440175.zip org.eclipse.stardust.ide-37d08156e971bb8b1529eedc378012977b440175.tar.gz org.eclipse.stardust.ide-37d08156e971bb8b1529eedc378012977b440175.tar.bz2 | |
Jira-ID: CRNT-22383 Merge changes done on b_dev_6_0_x after 6.0.2.GA (6.0.2.2-r49368) through 6.0.3.GA (6.0.3.6-r50668) and beyond (6.0.x HEAD) to 7.0 (trunk) - moonglow / simulation / tate / tds (org.eclipse.stardust.modeling.debug)
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@53265 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
19 files changed, 111 insertions, 76 deletions
diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/Debug_Messages.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/Debug_Messages.java index 5c7d57b..49b51b9 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/Debug_Messages.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/Debug_Messages.java @@ -25,6 +25,7 @@ public class Debug_Messages extends NLS NLS.initializeMessages(BUNDLE_NAME, Debug_Messages.class); } + public static String LABEL_JOB_ChangeMode; public static String LaunchAction_Name; public static String LaunchAction_ToolTip; public static String LaunchDelegate_CanNotLaunch; @@ -39,10 +40,8 @@ public class Debug_Messages extends NLS public static String LaunchDelegate_WARNING; public static String MSG_COND_isNoArrayType; public static String MSG_TransitionTokenDigest_ToString; - public static String MSG_ActivityInstanceDigest_ToString; public static String EXP_VariableDoesNotExist; public static String EXP_ErrorOccuredWhileLoadingModelFile; - public static String MSG_CONS_InstanceNeccessary; public static String TESTCHANGEKEY; public static String MSG_SelectWorkflowModelInProject; public static String TXT_ProjectHasToBeSpecified; @@ -60,6 +59,7 @@ public class Debug_Messages extends NLS public static String ERR_SpecifyProcessDefinitionID; public static String EXP_BundleHasNotBeenLoadedYet; public static String EXP_BundleDoesNotContain; + public static String EXP_CannotFindEditorForModelNamespace; public static String EXP_ErrorWhileExtendingBootpath; public static String CWM_DEBUG_NAME_CARNOTWorkflowDebugger; public static String CWM_DEBUG_MSG_CurrentActivityInstanceDigest; @@ -81,20 +81,23 @@ public class Debug_Messages extends NLS public static String MSG_ProcessDefinitionUnspecified; public static String MSG_ProcessDefIdEmpty; public static String MSG_ProcessDefWithIdNotFound; - public static String MSG_ProcessInstanceDigest_ToString; public static String ASSERT_ValueCarrierMayNotBeNull; - public static String ASSERT_ListOfActivityInstancesMayNotBeNull; + public static String BTN_AddToElement; + public static String BTN_Delete; public static String BUTTON_ClearContent; public static String TOOLTIP_ClearContent; public static String BUTTON_ClearEmptyPerformers; public static String TOOLTIP_ClearEmptyPerformers; public static String MSG_ActivityInstanceCannotBeResumedFromWorklist; + public static String MSG_NoSymbolFoundForActivity; public static String BUTTON_ActivateFromWorklist; public static String TOOLTIP_ActivateFromWorklist; public static String TITLE_CARNOTWorklist; public static String WorklistContentFormat; public static String CWMThread_MSG_RootProcessInstance; public static String CWMThread_MSG_NoRootProcessInstance; + public static String DSCR_InfinityDebugLibrary; public static String MSG_ProcessOID; + public static String MSG_RemoveAnnotations; public static String MSG_SelectType; } diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debug_messages.properties b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debug_messages.properties index 0639688..5117d5c 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debug_messages.properties +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debug_messages.properties @@ -14,17 +14,17 @@ MSG_ProcessDefIdEmpty=Process Definition ID is not allowed to be empty. MSG_ProcessOID=Process instance OID: {0} TESTCHANGEKEY=Select Project MSG_TransitionTokenDigest_ToString=Transition Token (OID: {0} Transition-ID: {1}) -MSG_ActivityInstanceDigest_ToString=ActivityInstance (OID: {0} Activity-ID: {1} ProcDef-ID: {2}) MSG_ActivityInstanceCannotBeResumedFromWorklist=Activity instance {0} cannot be resumed from worklist, because there is no associated workflow thread found. MSG_ModelFileDoesNotExist=Model file {0} does not exist. MSG_SelectWorkflowModelInProject=Select workflow model in project {0} MSG_ProcessDefinitionUnspecified=Process definition unspecified. -MSG_ProcessInstanceDigest_ToString=ProcessInstance (OID: {0} ProcDef-ID: {1}) +EXP_CannotFindEditorForModelNamespace=Could not find editor for model with namespace ''{0}''. EXP_VariableDoesNotExist=Variable '{0}' does not exist. EXP_BundleDoesNotContain=Bundle {0} does not contain any of [{1}]. -MSG_CONS_InstanceNeccessary=Instance of {0} neccessary. MSG_ModelFileNeedsToBeLoaded=Model file {0} needs to be loaded. +MSG_NoSymbolFoundForActivity=No activity symbol found for: {0}. MSG_ProcessDefWithIdNotFound=Process definition with id {0} cannot be found. +MSG_RemoveAnnotations=To Remove Annotations EXP_ErrorOccuredWhileLoadingModelFile=An error occurred while loading a model file: {0}. EXP_ErrorWhileExtendingBootpath=Error while extending bootpath. EXP_FailedLoadingModel=Failed loading model @@ -34,6 +34,7 @@ TITLE_CARNOTWorklist=Infinity Worklist TXT_ProjectHasToBeSpecified=Project has to be specified. TXT_ModelFileHasToBeSpecified=Model file has to be specified. MSG_SelectProcessDefinitionFromModelFile=Select process definition from model file {0} +LABEL_JOB_ChangeMode=Change Mode LB_Project=&Project: LB_Browse=&Browse... LB_Model=&Model: @@ -59,12 +60,14 @@ CWMThread_MSG_RootProcessInstance=Completed root process: {0} CWMThread_MSG_NoRootProcessInstance=CWMThread: No root process instance... (handling Thread [{0}]) CWMThread_MSG_SetCurrentActivityInstance=setCurrentActivityInstance: {0} in workflow thread {1} ASSERT_ValueCarrierMayNotBeNull=valueCarrier may not be null\! -ASSERT_ListOfActivityInstancesMayNotBeNull=List of activity instances may not be null. +BTN_AddToElement=Add to "{0}" +BTN_Delete=Delete BUTTON_ClearContent=Clear content. TOOLTIP_ClearContent=Clear content. BUTTON_ClearEmptyPerformers=Clear empty performers. TOOLTIP_ClearEmptyPerformers=Clear empty performers. BUTTON_ActivateFromWorklist=Activate +DSCR_InfinityDebugLibrary=Infinity Debug Library TOOLTIP_ActivateFromWorklist=Activate activity instance WorklistContentFormat={0} LaunchAction_Name=Debug @@ -79,4 +82,4 @@ LaunchDelegate_CanNotLaunch=Launching Problem LaunchDelegate_MODE_Analyst=Analyst LaunchDelegate_MODE_Developer=Developer LaunchDelegate_MSG_OneSessionPerEditor=The process editor already has an active debug session. -MSG_SelectType=Select a structured type on the left. +MSG_SelectType=Select a structured type on the left.
\ No newline at end of file diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/UiAccessor.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/UiAccessor.java index f71e7fe..3602e69 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/UiAccessor.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/UiAccessor.java @@ -480,7 +480,9 @@ public class UiAccessor editor = getEditorForModel(CollectionUtils.<String>newSet(), model, namespace); if (editor == null) { - throw new RuntimeException("TO IMPLEMENT SURGE DEBUG"); + throw new RuntimeException(MessageFormat.format( + Debug_Messages.EXP_CannotFindEditorForModelNamespace, + new Object[] { namespace })); } } return (WorkflowModelEditor) editor; diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/types/DataField.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/types/DataField.java index b25af31..a645f48 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/types/DataField.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/types/DataField.java @@ -275,7 +275,7 @@ public class DataField extends AbstractJavaTypeValue if (null == theSerializable) { type = Reflect.getClassFromClassName(typeName); - trace.info("initFittingField: "+typeName); + trace.info("initFittingField: "+typeName); //$NON-NLS-1$ if (null == type) { trace.warn(MessageFormat.format(Internal_Debugger_Messages.getString("MSG_CannotFindClassForTypeName"), //$NON-NLS-1$ @@ -350,12 +350,12 @@ public class DataField extends AbstractJavaTypeValue else if (List.class.isAssignableFrom(type)) { theList = (List)data; - this.variableName = "theList"; + this.variableName = "theList"; //$NON-NLS-1$ } else if (Map.class.isAssignableFrom(type)) { theMap = (Map)data; - this.variableName = "theMap"; + this.variableName = "theMap"; //$NON-NLS-1$ } else { diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/types/ProcessInstanceDigest.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/types/ProcessInstanceDigest.java index c64730d..58e4357 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/types/ProcessInstanceDigest.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/types/ProcessInstanceDigest.java @@ -114,11 +114,11 @@ public class ProcessInstanceDigest extends AbstractJavaTypeValue { IData data = model.findData(qname.getLocalPart()); ExtendedAccessPathEvaluator evaluator = SpiUtils.createExtendedAccessPathEvaluator(data.getType()); - Object evaluatedValue = evaluator.evaluate(data, entry.getValue(), "", + Object evaluatedValue = evaluator.evaluate(data, entry.getValue(), "", //$NON-NLS-1$ new AccessPathEvaluationContext(processInstance, null)); if (trace.isDebugEnabled()) { - trace.debug("data is " + data.getId() + " value is " + entry.getValue() + " evaluated value is " + evaluatedValue); + trace.debug("data is " + data.getId() + " value is " + entry.getValue() + " evaluated value is " + evaluatedValue); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } digests.add(new DataValueDigest(data, (Serializable) evaluatedValue)); } diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/types/TransitionTokenDigest.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/types/TransitionTokenDigest.java index 61ce50e..305b5b6 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/types/TransitionTokenDigest.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/debugger/types/TransitionTokenDigest.java @@ -60,8 +60,8 @@ public class TransitionTokenDigest extends AbstractJavaTypeValue implements IHig ITransition transition = transitionToken.getTransition(); IModel model = transition == null ? null : (IModel) transition.getModel(); - transitionId = transition == null ? null : "{" + model.getId() + '}' + transition.getId(); - procDefId = transition == null ? null : "{" + model.getId() + '}' + transition.getProcessDefinition().getId(); + transitionId = transition == null ? null : "{" + model.getId() + '}' + transition.getId(); //$NON-NLS-1$ + procDefId = transition == null ? null : "{" + model.getId() + '}' + transition.getProcessDefinition().getId(); //$NON-NLS-1$ } /** diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/engine/DebugSession.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/engine/DebugSession.java index 9f14fb6..68fb98d 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/engine/DebugSession.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/engine/DebugSession.java @@ -693,7 +693,7 @@ public class DebugSession implements Session, Session.NotJoinEnabled else { accepted &= (null == match.getValue()) - || "null".equals(match.getValue()) || "NULL".equals(match.getValue()); //$NON-NLS-1$ + || "null".equals(match.getValue()) || "NULL".equals(match.getValue()); //$NON-NLS-1$ //$NON-NLS-2$ } } return accepted; diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/highlighting/HighlightManager.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/highlighting/HighlightManager.java index 1081076..9b7d6d8 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/highlighting/HighlightManager.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/highlighting/HighlightManager.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.stardust.modeling.debug.highlighting; +import java.text.MessageFormat; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -43,6 +44,7 @@ import org.eclipse.stardust.modeling.core.editors.parts.diagram.IHighliteableGra import org.eclipse.stardust.modeling.core.highlighting.HighlightState; import org.eclipse.stardust.modeling.core.highlighting.HighlightUtils; import org.eclipse.stardust.modeling.debug.Constants; +import org.eclipse.stardust.modeling.debug.Debug_Messages; import org.eclipse.stardust.modeling.debug.debugger.UiAccessor; import org.eclipse.stardust.modeling.debug.util.EmptyIterator; import org.eclipse.stardust.modeling.debug.util.WorkflowModelUtils; @@ -99,9 +101,11 @@ public class HighlightManager implements IPartListener, IDiagramChangeListener { QName qproc = QName.valueOf(processDefinitionId); String namespace = qproc.getNamespaceURI(); - if (!namespace.equals(model.getId())) + if ( !namespace.equals(model.getId())) { - throw new RuntimeException("TO IMPLEMENT SURGE DEBUG"); + throw new RuntimeException(MessageFormat.format( + Debug_Messages.EXP_CannotFindEditorForModelNamespace, + new Object[] { namespace })); } processDefinition = WorkflowModelUtils.findProcessDefinition(model, qproc.getLocalPart()); } @@ -115,9 +119,11 @@ public class HighlightManager implements IPartListener, IDiagramChangeListener if (processDefinitionChildId != null) { QName qchild = QName.valueOf(processDefinitionChildId); - if (!qchild.getNamespaceURI().equals(model.getId())) + if ( !qchild.getNamespaceURI().equals(model.getId())) { - throw new RuntimeException("TO IMPLEMENT SURGE DEBUG"); + throw new RuntimeException(MessageFormat.format( + Debug_Messages.EXP_CannotFindEditorForModelNamespace, + new Object[] { qchild.getNamespaceURI() })); } String childId = qchild.getLocalPart(); List contentList = processDefinition.eContents(); @@ -268,7 +274,9 @@ public class HighlightManager implements IPartListener, IDiagramChangeListener WorkflowModelEditor editor = UiAccessor.getEditorForModel(CollectionUtils.<String>newSet(), model, namespace); if (editor == null) { - throw new RuntimeException("TO IMPLEMENT SURGE DEBUG"); + throw new RuntimeException(MessageFormat.format( + Debug_Messages.EXP_CannotFindEditorForModelNamespace, + new Object[] { namespace })); } } } diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/ClasspathContainerInitializer.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/ClasspathContainerInitializer.java index 457678f..09bbb56 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/ClasspathContainerInitializer.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/ClasspathContainerInitializer.java @@ -16,6 +16,7 @@ import org.eclipse.jdt.core.IClasspathContainer; import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; +import org.eclipse.stardust.modeling.debug.Debug_Messages; public class ClasspathContainerInitializer extends org.eclipse.jdt.core.ClasspathContainerInitializer @@ -35,7 +36,7 @@ public class ClasspathContainerInitializer public String getDescription() { - return "Infinity Debug Library"; + return Debug_Messages.DSCR_InfinityDebugLibrary; } public int getKind() diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/LaunchConfigUtils.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/LaunchConfigUtils.java index a3d2cf5..09c7e64 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/LaunchConfigUtils.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/LaunchConfigUtils.java @@ -105,7 +105,7 @@ public class LaunchConfigUtils if (configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, (String) null) == null) { configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, - "-Dcarnot.log.type=stdout"); + "-Dcarnot.log.type=stdout"); //$NON-NLS-1$ } } catch (CoreException e) diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/LaunchDelegate.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/LaunchDelegate.java index 784871e..9568b89 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/LaunchDelegate.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/LaunchDelegate.java @@ -259,7 +259,7 @@ public class LaunchDelegate extends JavaLaunchDelegate public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Object result = method.invoke(finalConfiguration, args); - if ("getAttribute".equals(method.getName())) + if ("getAttribute".equals(method.getName())) //$NON-NLS-1$ { if (IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS.equals(args[0])) { @@ -302,7 +302,7 @@ public class LaunchDelegate extends JavaLaunchDelegate private void setMode(final WorkflowModelEditor editor, final boolean analystMode) { - UIJob job = new UIJob("Change Mode") + UIJob job = new UIJob(Debug_Messages.LABEL_JOB_ChangeMode) { public IStatus runInUIThread(IProgressMonitor monitor) { diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/RuntimeClasspathEntryResolver.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/RuntimeClasspathEntryResolver.java index 4d8aea4..d5a4332 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/RuntimeClasspathEntryResolver.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/RuntimeClasspathEntryResolver.java @@ -130,7 +130,7 @@ public class RuntimeClasspathEntryResolver implements IRuntimeClasspathEntryReso elementsIterator.next(); // skip the bundle name throw new CoreException(new Status(IStatus.ERROR, Constants.ID_CWM_DEBUG_MODEL, 0, MessageFormat.format(Debug_Messages.EXP_BundleDoesNotContain, - new String[] {elements[0], StringUtils.join(elementsIterator, ", ")}), + new String[] {elements[0], StringUtils.join(elementsIterator, ", ")}), //$NON-NLS-1$ null)); } diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/ui/CWMModelPresentation.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/ui/CWMModelPresentation.java index 5334dc5..5bcf9ac 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/ui/CWMModelPresentation.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/launching/ui/CWMModelPresentation.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.stardust.modeling.debug.launching.ui; +import java.text.MessageFormat; import java.util.Iterator; import java.util.List; @@ -33,6 +34,7 @@ import org.eclipse.stardust.model.xpdl.carnot.ModelType; import org.eclipse.stardust.model.xpdl.carnot.ProcessDefinitionType; import org.eclipse.stardust.modeling.core.DiagramPlugin; import org.eclipse.stardust.modeling.core.editors.WorkflowModelEditor; +import org.eclipse.stardust.modeling.debug.Debug_Messages; import org.eclipse.stardust.modeling.debug.debugger.UiAccessor; import org.eclipse.stardust.modeling.debug.debugger.types.ActivityInstanceDigest; import org.eclipse.stardust.modeling.debug.highlighting.HighlightManager; @@ -44,7 +46,8 @@ import org.eclipse.ui.IEditorPart; import org.eclipse.ui.PartInitException; import org.eclipse.ui.part.FileEditorInput; -public class CWMModelPresentation implements IDebugModelPresentation, IDebugEditorPresentation +public class CWMModelPresentation implements IDebugModelPresentation, + IDebugEditorPresentation { private boolean containsActivitySymbol(DiagramType diagram, ActivityType activity) { @@ -64,7 +67,7 @@ public class CWMModelPresentation implements IDebugModelPresentation, IDebugEdit return false; } - + private boolean showDiagramContainingActivity(WorkflowModelEditor editor, ActivityType activity) throws PartInitException { @@ -72,13 +75,13 @@ public class CWMModelPresentation implements IDebugModelPresentation, IDebugEdit boolean found = containsActivitySymbol(editor.getActiveDiagram(), activity); // search for activity symbol in other opened diagrams - if (!found) + if ( !found) { List diagrams = editor.getOpenedDiagrams(); for (Iterator diagIter = diagrams.iterator(); diagIter.hasNext();) { DiagramType diagram = (DiagramType) diagIter.next(); - if (!editor.isActiveDiagram(diagram)) + if ( !editor.isActiveDiagram(diagram)) { found = containsActivitySymbol(diagram, activity); if (found) @@ -91,9 +94,10 @@ public class CWMModelPresentation implements IDebugModelPresentation, IDebugEdit } // search for activity symbol in not opened diagrams - if (!found) + if ( !found) { - ProcessDefinitionType processdefinition = (ProcessDefinitionType) activity.eContainer(); + ProcessDefinitionType processdefinition = (ProcessDefinitionType) activity + .eContainer(); EList allDiagrams = processdefinition.getDiagram(); for (Iterator diagIter = allDiagrams.iterator(); diagIter.hasNext();) { @@ -127,22 +131,27 @@ public class CWMModelPresentation implements IDebugModelPresentation, IDebugEdit QName qproc = QName.valueOf(ai.getProcessDefinitionId()); String namespace = qproc.getNamespaceURI(); - if (!namespace.equals(model.getId())) + if ( !namespace.equals(model.getId())) { - editor = UiAccessor.getEditorForModel(CollectionUtils.<String>newSet(), model, namespace); + editor = UiAccessor.getEditorForModel(CollectionUtils.<String> newSet(), + model, namespace); if (editor == null) { - throw new RuntimeException("TO IMPLEMENT SURGE DEBUG"); + throw new RuntimeException(MessageFormat.format( + Debug_Messages.EXP_CannotFindEditorForModelNamespace, + new Object[] { namespace })); } model = editor.getWorkflowModel(); } - ProcessDefinitionType processDefinition = WorkflowModelUtils.findProcessDefinition(model, - qproc.getLocalPart()); + ProcessDefinitionType processDefinition = WorkflowModelUtils + .findProcessDefinition(model, qproc.getLocalPart()); QName qact = QName.valueOf(ai.getActivityId()); - if (!qact.getNamespaceURI().equals(model.getId())) + if ( !qact.getNamespaceURI().equals(model.getId())) { - throw new RuntimeException("TO IMPLEMENT SURGE DEBUG"); + throw new RuntimeException(MessageFormat.format( + Debug_Messages.EXP_CannotFindEditorForModelNamespace, + new Object[] { qact.getNamespaceURI() })); } ActivityType activity = WorkflowModelUtils.findActivity(processDefinition, qact.getLocalPart()); @@ -174,7 +183,8 @@ public class CWMModelPresentation implements IDebugModelPresentation, IDebugEdit } else { - throw new RuntimeException("No activity symbol found for: " + activity); + throw new RuntimeException(MessageFormat.format( + Debug_Messages.MSG_NoSymbolFoundForActivity, new Object[] { activity })); } return found; @@ -190,7 +200,7 @@ public class CWMModelPresentation implements IDebugModelPresentation, IDebugEdit public void removeAnnotations(IEditorPart editorPart, IThread thread) { - System.out.println("To Remove Annotations"); + System.out.println(Debug_Messages.MSG_RemoveAnnotations); } public void setAttribute(String attribute, Object value) diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/CWMDebugTarget.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/CWMDebugTarget.java index 5773dd4..8e80e39 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/CWMDebugTarget.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/CWMDebugTarget.java @@ -399,19 +399,19 @@ public class CWMDebugTarget extends CWMDebugElement ActivityInstanceDigest details = null; if (Debugger.WorkflowEventListenerImpl.startedActivityInstanceMethodName.equals(methodName)) { - details = JavaTypeValueFactory.createInstance("activityInstance", vars); + details = JavaTypeValueFactory.createInstance("activityInstance", vars); //$NON-NLS-1$ workflowEventCallback.startedActivityInstance(details); } else if (Debugger.WorkflowEventListenerImpl.completedActivityInstanceMethodName .equals(methodName)) { - details = JavaTypeValueFactory.createInstance("activityInstance", vars); + details = JavaTypeValueFactory.createInstance("activityInstance", vars); //$NON-NLS-1$ workflowEventCallback.completedActivityInstance(details); } else if (Debugger.WorkflowEventListenerImpl.appendedToWorklistMethodName .equals(methodName)) { - details = JavaTypeValueFactory.createInstance("activityInstance", vars); + details = JavaTypeValueFactory.createInstance("activityInstance", vars); //$NON-NLS-1$ workflowEventCallback.appendedToWorklist(details); } trace.info(MessageFormat.format(Debug_Messages.CWM_DEBUG_MSG_CurrentActivityInstanceDigest, details)); diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ManualApplicationDialog.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ManualApplicationDialog.java index 2ffbd64..aa7b4a8 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ManualApplicationDialog.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ManualApplicationDialog.java @@ -92,7 +92,8 @@ public class ManualApplicationDialog extends Dialog } catch (Exception e) { - throw new InternalException("Cannot instantiate class '" + className + "'.", e); + throw new InternalException(MessageFormat.format( + Internal_Debugger_Messages.getString("MSG_CannotInstantiateClass"), new Object[] { className }), e); //$NON-NLS-1$ } } @@ -398,13 +399,13 @@ public class ManualApplicationDialog extends Dialog { if (String.class.isAssignableFrom(type)) { - result.append("new String(\""); + result.append("new String(\""); //$NON-NLS-1$ result.append(value); - result.append("\")"); + result.append("\")"); //$NON-NLS-1$ } else if (Character.class.isAssignableFrom(type)) { - result.append("new Character('"); + result.append("new Character('"); //$NON-NLS-1$ if (StringUtils.isEmpty(value)) { result.append(' '); @@ -413,7 +414,7 @@ public class ManualApplicationDialog extends Dialog { result.append(value.charAt(0)); } - result.append("')"); + result.append("')"); //$NON-NLS-1$ } else if (Calendar.class.isAssignableFrom(type)) { @@ -421,15 +422,15 @@ public class ManualApplicationDialog extends Dialog { if (value.indexOf(' ') < 0) { - value += " 00:00:00"; + value += " 00:00:00"; //$NON-NLS-1$ } Date date = DateUtils.getInteractiveDateFormat().parse(value); result - .append("java.util.Calendar result = java.util.Calendar.getInstance();"); - result.append("result.setTime(new java.util.Date("); + .append("java.util.Calendar result = java.util.Calendar.getInstance();"); //$NON-NLS-1$ + result.append("result.setTime(new java.util.Date("); //$NON-NLS-1$ result.append(date.getTime()); - result.append("L));"); - result.append("return result;"); + result.append("L));"); //$NON-NLS-1$ + result.append("return result;"); //$NON-NLS-1$ } catch (Exception e) { @@ -443,12 +444,12 @@ public class ManualApplicationDialog extends Dialog { if (value.indexOf(' ') < 0) { - value += " 00:00:00"; + value += " 00:00:00"; //$NON-NLS-1$ } Date date = DateUtils.getInteractiveDateFormat().parse(value); - result.append("new java.util.Date("); + result.append("new java.util.Date("); //$NON-NLS-1$ result.append(date.getTime()); - result.append("L)"); + result.append("L)"); //$NON-NLS-1$ } catch (Exception e) { @@ -462,7 +463,7 @@ public class ManualApplicationDialog extends Dialog String dataPath = dataMappingDigest.getDataField().getDataPath(); if (dataPath == null) { - dataPath = ""; + dataPath = ""; //$NON-NLS-1$ } try { @@ -503,11 +504,11 @@ public class ManualApplicationDialog extends Dialog // will throw an exception if constructor is not available. type.getConstructor(new Class[] {String.class}); - result.append("new "); + result.append("new "); //$NON-NLS-1$ result.append(javaType.getName()); - result.append("(\""); + result.append("(\""); //$NON-NLS-1$ result.append(value); - result.append("\")"); + result.append("\")"); //$NON-NLS-1$ } catch (Exception e) { @@ -530,7 +531,8 @@ public class ManualApplicationDialog extends Dialog return dataMappings[i]; } } - throw new RuntimeException("Data mapping '" + mappingId + "' not found."); + throw new RuntimeException(MessageFormat.format( + Internal_Debugger_Messages.getString("MSG_DataMappingNotFound"), new Object[] { mappingId })); //$NON-NLS-1$ } } @@ -717,7 +719,7 @@ public class ManualApplicationDialog extends Dialog layout.numColumns = 4; c1.setLayout(layout); Button b1 = new Button(c1, SWT.PUSH); - b1.setText("first button"); + b1.setText("first button"); //$NON-NLS-1$ c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT)); // set the minimum width and height of the scrolled content - method 2 @@ -732,11 +734,11 @@ public class ManualApplicationDialog extends Dialog layout.numColumns = 4; c2.setLayout(layout); Button b2 = new Button(c2, SWT.PUSH); - b2.setText("first button"); + b2.setText("first button"); //$NON-NLS-1$ sc2.setMinSize(c2.computeSize(SWT.DEFAULT, SWT.DEFAULT)); Button add = new Button(shell, SWT.PUSH); - add.setText("add children"); + add.setText("add children"); //$NON-NLS-1$ final int[] index = new int[] {0}; add.addListener(SWT.Selection, new Listener() { @@ -744,13 +746,13 @@ public class ManualApplicationDialog extends Dialog { index[0]++; Button button = new Button(c1, SWT.PUSH); - button.setText("button " + index[0]); + button.setText("button " + index[0]); //$NON-NLS-1$ // reset size of content so children can be seen - method 1 c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT)); c1.layout(); button = new Button(c2, SWT.PUSH); - button.setText("button " + index[0]); + button.setText("button " + index[0]); //$NON-NLS-1$ // reset the minimum width and height so children can be seen - method 2 sc2.setMinSize(c2.computeSize(SWT.DEFAULT, SWT.DEFAULT)); c2.layout(); diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/ControlGuiFactory.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/ControlGuiFactory.java index 1e929b0..5fdabbc 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/ControlGuiFactory.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/ControlGuiFactory.java @@ -152,7 +152,7 @@ public class ControlGuiFactory { // old way (text field for everything else) Text control = new Text(panel, SWT.BORDER); - if ("java.lang.Character".equals(dataMappingDigest.getMappedTypeName())) + if ("java.lang.Character".equals(dataMappingDigest.getMappedTypeName())) //$NON-NLS-1$ { control.setTextLimit(1); } diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/StructuredTree.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/StructuredTree.java index 82f9781..2291fd3 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/StructuredTree.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/StructuredTree.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.stardust.modeling.debug.model.ui; +import java.text.MessageFormat; import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -19,6 +20,7 @@ import org.eclipse.stardust.engine.core.runtime.beans.BigData; import org.eclipse.stardust.engine.core.struct.IXPathMap; import org.eclipse.stardust.engine.core.struct.StructuredDataXPathUtils; import org.eclipse.stardust.engine.core.struct.TypedXPath; +import org.eclipse.stardust.modeling.debug.Debug_Messages; import org.eclipse.swt.SWT; import org.eclipse.swt.events.MouseAdapter; import org.eclipse.swt.events.MouseEvent; @@ -71,7 +73,8 @@ public class StructuredTree extends TreeViewer { MenuItem actionItem = new MenuItem(popupMenu, SWT.PUSH); final String elementName = StructuredDataXPathUtils.getLastXPathPart(typedXPath.getXPath()); - actionItem.setText("Add to \""+elementName+"\""); + actionItem.setText(MessageFormat.format(Debug_Messages.BTN_AddToElement, + new Object[] { elementName })); actionItem.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) @@ -112,7 +115,7 @@ public class StructuredTree extends TreeViewer if (selectedValue.getXPath().isList()) { MenuItem actionItem = new MenuItem(popupMenu, SWT.PUSH); - actionItem.setText("Delete"); + actionItem.setText(Debug_Messages.BTN_Delete); actionItem.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/StructuredTreeContentProvider.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/StructuredTreeContentProvider.java index f29b3b4..d1259b3 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/StructuredTreeContentProvider.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/StructuredTreeContentProvider.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.stardust.modeling.debug.model.ui; +import java.text.MessageFormat; import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -23,6 +24,7 @@ import org.eclipse.stardust.engine.core.runtime.beans.BigData; import org.eclipse.stardust.engine.core.struct.IXPathMap; import org.eclipse.stardust.engine.core.struct.StructuredDataXPathUtils; import org.eclipse.stardust.engine.core.struct.TypedXPath; +import org.eclipse.stardust.modeling.debug.Internal_Debugger_Messages; /** * Tree representation of structured data @@ -55,7 +57,7 @@ public class StructuredTreeContentProvider implements ITreeContentProvider } else { - return this.xPathMap.getXPath(parentXPath.getXPath()+"/"+childName); + return this.xPathMap.getXPath(parentXPath.getXPath()+"/"+childName); //$NON-NLS-1$ } } @@ -152,7 +154,8 @@ public class StructuredTreeContentProvider implements ITreeContentProvider } else { - throw new PublicException("Unsupported class '"+rootData.getClass().getName()+"'"); + throw new PublicException(MessageFormat.format(Internal_Debugger_Messages.getString("EXP_UnsupportedClass"), //$NON-NLS-1$ + new Object[] { rootData.getClass().getName() })); } } diff --git a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/StructuredTreeLabelProvider.java b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/StructuredTreeLabelProvider.java index 70eed53..08631a1 100644 --- a/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/StructuredTreeLabelProvider.java +++ b/modeling/org.eclipse.stardust.modeling.debug/src/org/eclipse/stardust/modeling/debug/model/ui/StructuredTreeLabelProvider.java @@ -55,7 +55,7 @@ public class StructuredTreeLabelProvider implements ILabelProvider { if (element == null) { - return "null"; + return "null"; //$NON-NLS-1$ } else { @@ -75,7 +75,7 @@ public class StructuredTreeLabelProvider implements ILabelProvider Map parentMap = (Map)value.getParent().getData(); List list = (List) parentMap.get(elementName); int position = list.indexOf(value.getData()) + 1; - return elementName + " ["+position+"]"; + return elementName + " ["+position+"]"; //$NON-NLS-1$ //$NON-NLS-2$ } else { |

