JBoss Tools SVN: r32600 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-05 05:18:38 -0400 (Tue, 05 Jul 2011)
New Revision: 32600
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java
Log:
[JBIDE-9215] unified duplicate calls to pollThread.cancel() into single method
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java 2011-07-05 09:02:47 UTC (rev 32599)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java 2011-07-05 09:18:38 UTC (rev 32600)
@@ -94,12 +94,13 @@
LaunchConfigUtils.createLaunchConfigurationWorkingCopy("Stop JBoss Server", STOP_LAUNCH_TYPE); //$NON-NLS-1$
new LocalStopLaunchConfigurator(getServer()).configure(wc);
ILaunch launch = wc.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
- IProcess stopProcess = waitForStopProcess(launch);
+ IProcess stopProcess = launch.getProcesses()[0];
+ waitFor(stopProcess);
if (stopProcess.getExitValue() == 0) {
// TODO: correct concurrent access to process, pollThread and nextStopRequiresForce
if( isProcessRunning() ) {
getActualBehavior().setServerStarted();
- pollThread.cancel(Messages.STOP_FAILED_MESSAGE);
+ cancelPolling(Messages.STOP_FAILED_MESSAGE);
nextStopRequiresForce = true;
}
}
@@ -109,16 +110,14 @@
}
- private IProcess waitForStopProcess(ILaunch launch) {
- IProcess stopProcess = launch.getProcesses()[0];
- while( !stopProcess.isTerminated()) {
+ private void waitFor(IProcess process) {
+ while( !process.isTerminated()) {
try {
Thread.yield();
Thread.sleep(100);
} catch(InterruptedException ie) {
}
}
- return stopProcess;
}
}.start();
// TODO: find out if this is ok. My current guess is that we should
@@ -180,8 +179,7 @@
for (int i = 0; i < size; i++) {
if (process != null && process.equals(events[i].getSource()) && events[i].getKind() == DebugEvent.TERMINATE) {
DebugPlugin.getDefault().removeDebugEventListener(this);
- if( pollThread != null )
- pollThread.cancel();
+ cancelPolling(null);
forceStop();
addProcessTerminatedEvent();
}
@@ -194,7 +192,7 @@
private boolean isProcessRunning() {
return process != null
- && process.isTerminated();
+ && !process.isTerminated();
}
public void serverStarting() {
@@ -217,14 +215,22 @@
}
protected void pollServer(boolean expectedState, IServerStatePoller poller) {
- if( pollThread != null ) {
- pollThread.cancel();
- }
+ cancelPolling(null);
this.pollThread = new PollThread(expectedState, poller, getActualBehavior());
pollThread.start();
}
+ protected void cancelPolling(String message) {
+ if (pollThread != null) {
+ if (message != null) {
+ pollThread.cancel(message);
+ } else {
+ pollThread.cancel();
+ }
+ }
+ }
+
public void publishStart(final IProgressMonitor monitor) throws CoreException {
if( shouldSuspendScanner() ) {
ExtensionManager.getDefault().getJMXRunner().beginTransaction(getServer(), this);
14 years, 5 months
JBoss Tools SVN: r32599 - in branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert: b2j/wizard and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-07-05 05:02:47 -0400 (Tue, 05 Jul 2011)
New Revision: 32599
Modified:
branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/messages/B2J.properties
branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BpmnToWizard.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/ErrorMessagesPage.java
Log:
JBIDE-9293:commit to 3.2.1cr2branch
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/messages/B2J.properties
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/messages/B2J.properties 2011-07-05 09:01:09 UTC (rev 32598)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/messages/B2J.properties 2011-07-05 09:02:47 UTC (rev 32599)
@@ -19,4 +19,4 @@
Bpmn_Translate_Message_WizardPage_Title=Conversion Warnings and Errors
Bpmn_Translate_Message_WizardpageViewer_Title=Warnings and Errors
Bpmn_Translate_Message_WizardPage_Message=Warnings and Errors that occurred during conversion
-Translate_Error_File_CanNotRead=Error\: Couldn''t read or parse {0} file to a DOM document\:
\ No newline at end of file
+Translate_Error_File_CanNotRead=Error\: Couldn''t read or parse {0} file to a DOM document
\ No newline at end of file
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java 2011-07-05 09:01:09 UTC (rev 32598)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java 2011-07-05 09:02:47 UTC (rev 32599)
@@ -91,9 +91,7 @@
}
- public List<String> translateBpmnToStrings() {
- List<String> warningList = new ArrayList<String>();
- List<String> errorList = new ArrayList<String>();
+ public void translateBpmnToStrings() {
Document bpmnDocument = null;
try {
@@ -142,12 +140,6 @@
warningList.addAll(generator.getWarnings());
errorList.addAll(generator.getErrors());
}
-
- List<String> list = new ArrayList<String>();
- list.addAll(errorList);
- list.addAll(warningList);
-
- return list;
}
public List<String> getStrForProcessList() {
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java 2011-07-05 09:01:09 UTC (rev 32598)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java 2011-07-05 09:02:47 UTC (rev 32599)
@@ -60,9 +60,10 @@
public void selectionChanged(SelectionChangedEvent event) {
updateControls();
currentSelection = viewer.getSelection();
+ ((BpmnToWizard) wizard).getErrorList().clear();
+ ((BpmnToWizard) wizard).getWarningList().clear();
((BpmnToWizard) wizard)
.setSelection((IStructuredSelection) currentSelection);
-
}
});
}
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BpmnToWizard.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BpmnToWizard.java 2011-07-05 09:01:09 UTC (rev 32598)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BpmnToWizard.java 2011-07-05 09:02:47 UTC (rev 32599)
@@ -59,6 +59,7 @@
protected List<String> poolIdList = new ArrayList<String>();
// the list contains errors or warnings when generating
protected List<String> errorList = new ArrayList<String>();
+ protected List<String> warningList = new ArrayList<String>();
public BpmnToWizard() {
super();
@@ -113,18 +114,18 @@
private void initialize() {
if (selection.getFirstElement() instanceof IFile) {
IFile bpmnFile = (IFile) selection.getFirstElement();
- bpmnFileName = bpmnFile.getName();
- bpmnFileParentPath = bpmnFile.getParent().getLocation()
- .toOSString();
- try {
- idMap = BPMNToUtil.getPoolIDsFromDocument(BPMNToUtil.parse(
- bpmnFileParentPath, bpmnFileName));
- poolIdList.clear();
- } catch (Exception e) {
- errorList.add(0, NLS.bind(
- B2JMessages.Translate_Error_File_CanNotRead,
- bpmnFileName));
- e.printStackTrace();
+ if ("bpmn".equals(bpmnFile.getFileExtension())) {
+ bpmnFileName = bpmnFile.getName();
+ bpmnFileParentPath = bpmnFile.getParent().getLocation()
+ .toOSString();
+ try {
+ idMap = BPMNToUtil.getPoolIDsFromDocument(BPMNToUtil.parse(
+ bpmnFileParentPath, bpmnFileName));
+ poolIdList.clear();
+ } catch (Exception e) {
+ errorList.add(0, NLS.bind(
+ B2JMessages.Translate_Error_File_CanNotRead, bpmnFileName));
+ }
}
}
if (poolsPage != null) {
@@ -133,13 +134,22 @@
}
public IWizardPage getNextPage(IWizardPage page) {
+ if (page.getName().equals(B2JMessages.Bpmn_File_Choose_WizardPage_Name)) {
+ if (errorList.size() > 0) {
+ errorPage.getListViewer().setInput(errorList);
+ return errorPage;
+ }
+ }
if (page.getName().equals(B2JMessages.Bpmn_Pool_Choose_WizardPage_Name)) {
- errorList = translateBpmnToStrings();
+ translateBpmnToStrings();
isDoTranslation = true;
- if (errorList.size() == 0) {
+ if (errorList.size() == 0 && warningList.size() == 0) {
return locationPage;
}
- errorPage.getListViewer().setInput(errorList);
+ List<String> list = new ArrayList<String>();
+ list.addAll(errorList);
+ list.addAll(warningList);
+ errorPage.getListViewer().setInput(list);
return super.getNextPage(page);
} else {
return super.getNextPage(page);
@@ -148,7 +158,7 @@
}
public boolean performFinish() {
- if(!isDoTranslation){
+ if (!isDoTranslation) {
translateBpmnToStrings();
}
createGeneratedFile(this.isOverWrite());
@@ -161,7 +171,7 @@
* a string list to reserve these strings the return list is error or
* warning messages
*/
- public abstract List<String> translateBpmnToStrings();
+ public abstract void translateBpmnToStrings();
/*
* write the generated strings to the files
@@ -175,14 +185,12 @@
return container.getLocation().toOSString();
}
-
/*
* refresh eclipse workspace
*/
public void refreshWorkspace() {
try {
- ResourcesPlugin.getWorkspace().getRoot().refreshLocal(
- IResource.DEPTH_INFINITE, null);
+ ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
} catch (CoreException e) {
e.printStackTrace();
}
@@ -204,6 +212,14 @@
this.errorList = errorList;
}
+ public List<String> getWarningList() {
+ return warningList;
+ }
+
+ public void setWarningList(List<String> warningList) {
+ this.warningList = warningList;
+ }
+
public IStructuredSelection getSelection() {
return selection;
}
@@ -237,7 +253,7 @@
IStructuredSelection targetLocationSelection) {
this.targetLocationSelection = targetLocationSelection;
}
-
+
public boolean isOverWrite() {
return isOverWrite;
}
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/ErrorMessagesPage.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/ErrorMessagesPage.java 2011-07-05 09:01:09 UTC (rev 32598)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/ErrorMessagesPage.java 2011-07-05 09:02:47 UTC (rev 32599)
@@ -58,6 +58,9 @@
}
public boolean isPageComplete() {
+ if (((BpmnToWizard)this.getWizard()).getErrorList().size() >0) {
+ return false;
+ }
return true;
}
14 years, 5 months
JBoss Tools SVN: r32598 - branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-07-05 05:01:09 -0400 (Tue, 05 Jul 2011)
New Revision: 32598
Modified:
branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java
Log:
JBIDE-8288: BPMN to jBPM export broken - NPE(to 3.2.1cr2 branch)
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java 2011-07-05 09:00:31 UTC (rev 32597)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java 2011-07-05 09:01:09 UTC (rev 32598)
@@ -91,7 +91,7 @@
return currentSelection;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public boolean checkSelectedResources(ISelection selectedResources) {
boolean res = true;
if (selectedResources instanceof IStructuredSelection
@@ -100,8 +100,7 @@
for (Iterator it = ss.iterator(); it.hasNext();) {
Object o = it.next();
if (o instanceof IFile) {
- if (!((IFile) o).getFileExtension()
- .equalsIgnoreCase("bpmn")) {
+ if (!"bpmn".equalsIgnoreCase(((IFile) o).getFileExtension())) {
res = false;
break;
}
@@ -125,7 +124,7 @@
boolean res = false;
if (element instanceof IFile) {
IFile file = (IFile) element;
- if (file.getFileExtension().equalsIgnoreCase(BPMN_FILE_EXT)) {
+ if (BPMN_FILE_EXT.equalsIgnoreCase(file.getFileExtension())) {
res = file.getProject().isAccessible();
}
}
@@ -144,8 +143,7 @@
IResource[] resources = container.members();
for (int i = 0; i < resources.length; i++) {
if (resources[i] instanceof IFile
- && ((IFile) resources[i]).getFileExtension()
- .equalsIgnoreCase(BPMN_FILE_EXT)) {
+ && BPMN_FILE_EXT.equalsIgnoreCase(((IFile) resources[i]).getFileExtension())) {
res = true;
break;
}
14 years, 5 months
JBoss Tools SVN: r32597 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-05 05:00:31 -0400 (Tue, 05 Jul 2011)
New Revision: 32597
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java
Log:
[JBIDE-9215] extracted duplicate checks for process to its own method (code gets more readable since method says what the check is all about)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java 2011-07-05 08:59:27 UTC (rev 32596)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java 2011-07-05 09:00:31 UTC (rev 32597)
@@ -63,7 +63,10 @@
}
public void stop(boolean force) {
int state = getServer().getServerState();
- if( force || process == null || process.isTerminated() || state == IServer.STATE_STOPPED || nextStopRequiresForce) {
+ if( force
+ || !isProcessRunning()
+ || state == IServer.STATE_STOPPED
+ || nextStopRequiresForce) {
forceStop();
return;
}
@@ -94,7 +97,7 @@
IProcess stopProcess = waitForStopProcess(launch);
if (stopProcess.getExitValue() == 0) {
// TODO: correct concurrent access to process, pollThread and nextStopRequiresForce
- if( process != null && !process.isTerminated() ) {
+ if( isProcessRunning() ) {
getActualBehavior().setServerStarted();
pollThread.cancel(Messages.STOP_FAILED_MESSAGE);
nextStopRequiresForce = true;
@@ -126,7 +129,7 @@
@Override
protected synchronized void forceStop() {
// just terminate the process.
- if( process != null && !process.isTerminated()) {
+ if( isProcessRunning()) {
try {
process.terminate();
addForceStopEvent();
@@ -189,6 +192,10 @@
DebugPlugin.getDefault().addDebugEventListener(processListener);
}
+ private boolean isProcessRunning() {
+ return process != null
+ && process.isTerminated();
+ }
public void serverStarting() {
nextStopRequiresForce = false;
14 years, 5 months
JBoss Tools SVN: r32596 - in branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert: src/org/jboss/tools/jbpm/convert/b2j/translate and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-07-05 04:59:27 -0400 (Tue, 05 Jul 2011)
New Revision: 32596
Modified:
branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/.settings/attachedFile.properties
branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/BPMN2JPDL.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/GeneratedFileLocationPage.java
Log:
JBIDE-8720: fix the NPE error when no export folder selected(to 3.2.1branch)
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/.settings/attachedFile.properties
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/.settings/attachedFile.properties 2011-07-05 05:58:39 UTC (rev 32595)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/.settings/attachedFile.properties 2011-07-05 08:59:27 UTC (rev 32596)
@@ -1,2 +1 @@
# index of importer -> set(imports)
-
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/BPMN2JPDL.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/BPMN2JPDL.java 2011-07-05 05:58:39 UTC (rev 32595)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/BPMN2JPDL.java 2011-07-05 08:59:27 UTC (rev 32596)
@@ -122,6 +122,7 @@
}
Element diagram = bpmnDocument.getRootElement();
+
if (this.poolIDList == null || this.poolIDList.size() == 0) {
for (Object pool : diagram
.elements(Constants.Bpmn_Pool_Element_Name)) {
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/GeneratedFileLocationPage.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/GeneratedFileLocationPage.java 2011-07-05 05:58:39 UTC (rev 32595)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/GeneratedFileLocationPage.java 2011-07-05 08:59:27 UTC (rev 32596)
@@ -72,8 +72,7 @@
public void addOtherAreas(Composite composite) {
button = new Button(composite, SWT.CHECK | SWT.NONE);
- button
- .setText(B2JMessages.Bpmn_GeneratedFile_Location_WizardPage_CheckBox);
+ button.setText(B2JMessages.Bpmn_GeneratedFile_Location_WizardPage_CheckBox);
button.setFont(composite.getFont());
button.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent arg0) {
@@ -105,7 +104,8 @@
}
public boolean isPageComplete() {
- if (viewer == null || viewer.getSelection() == null) {
+ if (viewer == null || viewer.getSelection() == null
+ || viewer.getSelection().isEmpty()) {
return false;
}
return true;
14 years, 5 months
JBoss Tools SVN: r32595 - in trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert: b2j/wizard and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-07-05 01:58:39 -0400 (Tue, 05 Jul 2011)
New Revision: 32595
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/messages/B2J.properties
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BpmnToWizard.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/ErrorMessagesPage.java
Log:
JBIDE-9293:commit to trunk
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/messages/B2J.properties
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/messages/B2J.properties 2011-07-04 20:37:22 UTC (rev 32594)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/messages/B2J.properties 2011-07-05 05:58:39 UTC (rev 32595)
@@ -19,4 +19,4 @@
Bpmn_Translate_Message_WizardPage_Title=Conversion Warnings and Errors
Bpmn_Translate_Message_WizardpageViewer_Title=Warnings and Errors
Bpmn_Translate_Message_WizardPage_Message=Warnings and Errors that occurred during conversion
-Translate_Error_File_CanNotRead=Error\: Couldn''t read or parse {0} file to a DOM document\:
\ No newline at end of file
+Translate_Error_File_CanNotRead=Error\: Couldn''t read or parse {0} file to a DOM document
\ No newline at end of file
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java 2011-07-04 20:37:22 UTC (rev 32594)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/wizard/B2JExportWizard.java 2011-07-05 05:58:39 UTC (rev 32595)
@@ -91,9 +91,7 @@
}
- public List<String> translateBpmnToStrings() {
- List<String> warningList = new ArrayList<String>();
- List<String> errorList = new ArrayList<String>();
+ public void translateBpmnToStrings() {
Document bpmnDocument = null;
try {
@@ -142,12 +140,6 @@
warningList.addAll(generator.getWarnings());
errorList.addAll(generator.getErrors());
}
-
- List<String> list = new ArrayList<String>();
- list.addAll(errorList);
- list.addAll(warningList);
-
- return list;
}
public List<String> getStrForProcessList() {
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java 2011-07-04 20:37:22 UTC (rev 32594)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java 2011-07-05 05:58:39 UTC (rev 32595)
@@ -60,9 +60,10 @@
public void selectionChanged(SelectionChangedEvent event) {
updateControls();
currentSelection = viewer.getSelection();
+ ((BpmnToWizard) wizard).getErrorList().clear();
+ ((BpmnToWizard) wizard).getWarningList().clear();
((BpmnToWizard) wizard)
.setSelection((IStructuredSelection) currentSelection);
-
}
});
}
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BpmnToWizard.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BpmnToWizard.java 2011-07-04 20:37:22 UTC (rev 32594)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BpmnToWizard.java 2011-07-05 05:58:39 UTC (rev 32595)
@@ -59,6 +59,7 @@
protected List<String> poolIdList = new ArrayList<String>();
// the list contains errors or warnings when generating
protected List<String> errorList = new ArrayList<String>();
+ protected List<String> warningList = new ArrayList<String>();
public BpmnToWizard() {
super();
@@ -113,18 +114,18 @@
private void initialize() {
if (selection.getFirstElement() instanceof IFile) {
IFile bpmnFile = (IFile) selection.getFirstElement();
- bpmnFileName = bpmnFile.getName();
- bpmnFileParentPath = bpmnFile.getParent().getLocation()
- .toOSString();
- try {
- idMap = BPMNToUtil.getPoolIDsFromDocument(BPMNToUtil.parse(
- bpmnFileParentPath, bpmnFileName));
- poolIdList.clear();
- } catch (Exception e) {
- errorList.add(0, NLS.bind(
- B2JMessages.Translate_Error_File_CanNotRead,
- bpmnFileName));
- e.printStackTrace();
+ if ("bpmn".equals(bpmnFile.getFileExtension())) {
+ bpmnFileName = bpmnFile.getName();
+ bpmnFileParentPath = bpmnFile.getParent().getLocation()
+ .toOSString();
+ try {
+ idMap = BPMNToUtil.getPoolIDsFromDocument(BPMNToUtil.parse(
+ bpmnFileParentPath, bpmnFileName));
+ poolIdList.clear();
+ } catch (Exception e) {
+ errorList.add(0, NLS.bind(
+ B2JMessages.Translate_Error_File_CanNotRead, bpmnFileName));
+ }
}
}
if (poolsPage != null) {
@@ -133,13 +134,22 @@
}
public IWizardPage getNextPage(IWizardPage page) {
+ if (page.getName().equals(B2JMessages.Bpmn_File_Choose_WizardPage_Name)) {
+ if (errorList.size() > 0) {
+ errorPage.getListViewer().setInput(errorList);
+ return errorPage;
+ }
+ }
if (page.getName().equals(B2JMessages.Bpmn_Pool_Choose_WizardPage_Name)) {
- errorList = translateBpmnToStrings();
+ translateBpmnToStrings();
isDoTranslation = true;
- if (errorList.size() == 0) {
+ if (errorList.size() == 0 && warningList.size() == 0) {
return locationPage;
}
- errorPage.getListViewer().setInput(errorList);
+ List<String> list = new ArrayList<String>();
+ list.addAll(errorList);
+ list.addAll(warningList);
+ errorPage.getListViewer().setInput(list);
return super.getNextPage(page);
} else {
return super.getNextPage(page);
@@ -148,7 +158,7 @@
}
public boolean performFinish() {
- if(!isDoTranslation){
+ if (!isDoTranslation) {
translateBpmnToStrings();
}
createGeneratedFile(this.isOverWrite());
@@ -161,7 +171,7 @@
* a string list to reserve these strings the return list is error or
* warning messages
*/
- public abstract List<String> translateBpmnToStrings();
+ public abstract void translateBpmnToStrings();
/*
* write the generated strings to the files
@@ -175,14 +185,12 @@
return container.getLocation().toOSString();
}
-
/*
* refresh eclipse workspace
*/
public void refreshWorkspace() {
try {
- ResourcesPlugin.getWorkspace().getRoot().refreshLocal(
- IResource.DEPTH_INFINITE, null);
+ ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
} catch (CoreException e) {
e.printStackTrace();
}
@@ -204,6 +212,14 @@
this.errorList = errorList;
}
+ public List<String> getWarningList() {
+ return warningList;
+ }
+
+ public void setWarningList(List<String> warningList) {
+ this.warningList = warningList;
+ }
+
public IStructuredSelection getSelection() {
return selection;
}
@@ -237,7 +253,7 @@
IStructuredSelection targetLocationSelection) {
this.targetLocationSelection = targetLocationSelection;
}
-
+
public boolean isOverWrite() {
return isOverWrite;
}
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/ErrorMessagesPage.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/ErrorMessagesPage.java 2011-07-04 20:37:22 UTC (rev 32594)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/ErrorMessagesPage.java 2011-07-05 05:58:39 UTC (rev 32595)
@@ -58,6 +58,9 @@
}
public boolean isPageComplete() {
+ if (((BpmnToWizard)this.getWizard()).getErrorList().size() >0) {
+ return false;
+ }
return true;
}
14 years, 5 months
JBoss Tools SVN: r32594 - in trunk/as/tests/org.jboss.ide.eclipse.as.test: .settings and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 16:37:22 -0400 (Mon, 04 Jul 2011)
New Revision: 32594
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/.project
trunk/as/tests/org.jboss.ide.eclipse.as.test/.settings/
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/JBossLaunchConfigTests.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigConfiguratorFactory.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigTests.java
Log:
[JBIDE-9215] adapted tests to api changes
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/.project
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/.project 2011-07-04 20:32:42 UTC (rev 32593)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/.project 2011-07-04 20:37:22 UTC (rev 32594)
@@ -25,8 +25,14 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
Property changes on: trunk/as/tests/org.jboss.ide.eclipse.as.test/.settings
___________________________________________________________________
Added: svn:ignore
+ org.eclipse.m2e.core.prefs
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/JBossLaunchConfigTests.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/JBossLaunchConfigTests.java 2011-07-04 20:32:42 UTC (rev 32593)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/JBossLaunchConfigTests.java 2011-07-04 20:37:22 UTC (rev 32594)
@@ -10,20 +10,20 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.test.launch;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.areEnvironmentVariablesSet;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.areProgramArgumentsSet;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.areVMArgumentsSet;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isClasspathProviderSet;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isClasspathSet;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isConfigSet;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isDefaultClasspathSet;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isEndorsedDirSet;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isHostSet;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isJreContainerSet;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isMainTypeSet;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isServerHomeSet;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isServerIdSet;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isWorkingDirectorySet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties.areEnvironmentVariablesSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties.areProgramArgumentsSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties.areVMArgumentsSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties.isClasspathProviderSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties.isClasspathSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties.isConfigSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties.isUseDefaultClasspathSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties.isEndorsedDirSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties.isHostSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties.isJreContainerSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties.isMainTypeSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties.isServerHomeSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties.isServerIdSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties.isWorkingDirectorySet;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
@@ -53,7 +53,7 @@
assertTrue(areEnvironmentVariablesSet(launchConfig));
assertTrue(isClasspathSet(launchConfig));
assertTrue(isClasspathProviderSet(launchConfig));
- assertTrue(isDefaultClasspathSet(launchConfig));
+ assertTrue(isUseDefaultClasspathSet(launchConfig));
assertTrue(isJreContainerSet(launchConfig));
assertTrue(isConfigSet(launchConfig));
assertTrue(isServerHomeSet(launchConfig));
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigConfiguratorFactory.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigConfiguratorFactory.java 2011-07-04 20:32:42 UTC (rev 32593)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigConfiguratorFactory.java 2011-07-04 20:37:22 UTC (rev 32594)
@@ -14,7 +14,7 @@
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossStartupConfigurator;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.LocalJBossStartupConfigurator;
/**
* @author André Dietisheim
@@ -23,7 +23,7 @@
public static ILaunchConfigurationWorkingCopy createCustomConfigLocationLaunchConfig(IServer mockServer) throws CoreException {
MockLaunchConfigWorkingCopy launchConfig = new MockLaunchConfigWorkingCopy();
- JBossStartupConfigurator configurator = new JBossStartupConfigurator(mockServer) {
+ LocalJBossStartupConfigurator configurator = new LocalJBossStartupConfigurator(mockServer) {
@Override
protected boolean isCustomConfigLocation(IJBossServerRuntime runtime) {
return false;
@@ -35,7 +35,7 @@
public static MockLaunchConfigWorkingCopy createNonCustomConfigLocationLaunchConfig(IServer server) throws CoreException {
MockLaunchConfigWorkingCopy launchConfig = new MockLaunchConfigWorkingCopy();
- new JBossStartupConfigurator(server).configure(launchConfig);
+ new LocalJBossStartupConfigurator(server).configure(launchConfig);
return launchConfig;
}
}
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigTests.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigTests.java 2011-07-04 20:32:42 UTC (rev 32593)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/launch/LaunchConfigTests.java 2011-07-04 20:37:22 UTC (rev 32594)
@@ -10,7 +10,7 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.test.launch;
-import static org.jboss.ide.eclipse.as.core.server.internal.launch.JBossRuntimeLaunchConfigUtils.isServerHomeSet;
+import static org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.JBossLaunchConfigProperties.isServerHomeSet;
import java.util.List;
@@ -21,8 +21,8 @@
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
-import org.jboss.ide.eclipse.as.core.server.internal.launch.AbstractStartupConfigurator;
-import org.jboss.ide.eclipse.as.core.server.internal.launch.ILaunchConfigConfigurator;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.AbstractStartupConfigurator;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.configuration.ILaunchConfigConfigurator;
import org.jboss.ide.eclipse.as.test.util.ServerRuntimeUtils;
/**
@@ -46,7 +46,7 @@
ILaunchConfigConfigurator mockConfigurator = new MockConfigurator(mockServer) {
@Override
- protected void doConfigure(ILaunchConfigurationWorkingCopy launchConfig) throws CoreException {
+ protected void doConfigure(ILaunchConfigurationWorkingCopy launchConfig, JBossServer jbossServer, IJBossServerRuntime jbossRuntime) throws CoreException {
/**
* should only be called once
*/
14 years, 5 months
JBoss Tools SVN: r32593 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 16:32:42 -0400 (Mon, 04 Jul 2011)
New Revision: 32593
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeConstants.java
Log:
[JBIDE-9215] added server-id attribute constant
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeConstants.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeConstants.java 2011-07-04 20:32:04 UTC (rev 32592)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeConstants.java 2011-07-04 20:32:42 UTC (rev 32593)
@@ -36,6 +36,7 @@
public static final String STARTUP_ARG_HOST_LONG = "--host"; //$NON-NLS-1$
public static final String STARTUP_ARG_CONFIG_SHORT = "-c"; //$NON-NLS-1$
public static final String STARTUP_ARG_CONFIG_LONG = "--configuration"; //$NON-NLS-1$
+ public static final String SERVER_ID = "server-id"; //$NON-NLS-1$
public static final String SERVER_ARG = "-server"; //$NON-NLS-1$
public static final String DEFAULT_MEM_ARGS = "-Xms256m -Xmx512m -XX:MaxPermSize=256m "; //$NON-NLS-1$
public static final String DEFAULT_MEM_ARGS_AS50 = "-Xms256m -Xmx768m -XX:MaxPermSize=256m "; //$NON-NLS-1$
14 years, 5 months
JBoss Tools SVN: r32592 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 16:32:04 -0400 (Mon, 04 Jul 2011)
New Revision: 32592
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java
Log:
[JBIDE-9215] removed server check in implementation (call to diferent code variants for different server variants are now implemented by different calling classes)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java 2011-07-04 20:30:13 UTC (rev 32591)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/LaunchConfigUtils.java 2011-07-04 20:32:04 UTC (rev 32592)
@@ -23,7 +23,6 @@
import org.jboss.ide.eclipse.as.core.Messages;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.server.internal.launch.RunJarContainerWrapper;
-import org.jboss.ide.eclipse.as.core.server.internal.launch.StopLaunchConfiguration;
/**
* @author André Dietisheim
@@ -93,12 +92,12 @@
public static IRuntimeClasspathEntry getRunJarRuntimeCPEntry(IServer server) throws CoreException {
// TODO: improve/avoid server version check
- if (server.getServerType().getId().endsWith("70")) { //$NON-NLS-1$
- return getModulesClasspathEntry(server);
- } else {
+// if (server.getServerType().getId().endsWith("70")) { //$NON-NLS-1$
+// return getModulesClasspathEntry(server);
+// } else {
IPath containerPath = new Path(RunJarContainerWrapper.ID).append(server.getName());
return JavaRuntime.newRuntimeContainerClasspathEntry(containerPath, IRuntimeClasspathEntry.USER_CLASSES);
- }
+// }
}
public static IRuntimeClasspathEntry getModulesClasspathEntry(JBossServer server) throws CoreException {
14 years, 5 months
JBoss Tools SVN: r32591 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 16:30:13 -0400 (Mon, 04 Jul 2011)
New Revision: 32591
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/RuntimeUtils.java
Log:
[JBIDE-9215] added additionnal null check
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/RuntimeUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/RuntimeUtils.java 2011-07-04 20:29:38 UTC (rev 32590)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/RuntimeUtils.java 2011-07-04 20:30:13 UTC (rev 32591)
@@ -21,7 +21,10 @@
public class RuntimeUtils {
public static IJBossServerRuntime getJBossServerRuntime(IServerAttributes server) {
- IRuntime rt = server.getRuntime();
+ IRuntime rt = null;
+ if (server != null) {
+ rt = server.getRuntime();
+ }
IJBossServerRuntime jbrt = null;
if (rt != null)
jbrt = (IJBossServerRuntime) rt.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
14 years, 5 months