JBoss Tools SVN: r13910 - in trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog: tabs and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-03-02 08:11:38 -0500 (Mon, 02 Mar 2009)
New Revision: 13910
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java
Log:
code adjustment, system.out.println() was removed
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-03-02 13:00:09 UTC (rev 13909)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-03-02 13:11:38 UTC (rev 13910)
@@ -920,13 +920,4 @@
}
}
}
-// /**
-// * Create a message string for user
-// * @param currentFile
-// * @return
-// */
-// private static final String getMessageForSaveDialog(IFile currentFile){
-// String userMessage ="'" + currentFile.getFullPath().toOSString() + "' " + JstUIMessages.CSS_SAVE_DIALOG_MESSAGE; //$NON-NLS-1$//$NON-NLS-2$
-// return userMessage;
-// }
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java 2009-03-02 13:00:09 UTC (rev 13909)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java 2009-03-02 13:11:38 UTC (rev 13910)
@@ -115,7 +115,6 @@
label = new Label(this, SWT.CENTER);
label.setText(JstUIMessages.CSS_NO_EDITED_PROPERTIES);
}
- System.out.println();
Collections.sort(listKeys);
updateDataFromStyleAttributes = true;
for (String key : listKeys) {
15 years, 9 months
JBoss Tools SVN: r13909 - in branches/jbosstools-3.0.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog: tabs and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-03-02 08:00:09 -0500 (Mon, 02 Mar 2009)
New Revision: 13909
Modified:
branches/jbosstools-3.0.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
branches/jbosstools-3.0.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3869
Modified: branches/jbosstools-3.0.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
--- branches/jbosstools-3.0.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-03-02 05:58:08 UTC (rev 13908)
+++ branches/jbosstools-3.0.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-03-02 13:00:09 UTC (rev 13909)
@@ -15,43 +15,28 @@
import java.util.Iterator;
import java.util.List;
import java.util.Set;
-
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.jface.fieldassist.ComboContentAdapter;
-import org.eclipse.jface.fieldassist.ContentProposalAdapter;
-import org.eclipse.jface.fieldassist.IContentProposal;
-import org.eclipse.jface.fieldassist.IContentProposalListener;
import org.eclipse.jface.fieldassist.SimpleContentProposalProvider;
-import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -59,23 +44,13 @@
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
-import org.eclipse.ui.model.BaseWorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.progress.UIJob;
import org.jboss.tools.common.model.ui.widgets.Split;
-import org.jboss.tools.jst.jsp.JspEditorPlugin;
import org.jboss.tools.jst.jsp.messages.JstUIMessages;
import org.jboss.tools.jst.jsp.outline.cssdialog.common.CSSModel;
import org.jboss.tools.jst.jsp.outline.cssdialog.common.Constants;
-import org.jboss.tools.jst.jsp.outline.cssdialog.common.FileExtensionFilter;
import org.jboss.tools.jst.jsp.outline.cssdialog.common.Util;
import org.jboss.tools.jst.jsp.outline.cssdialog.events.ChangeStyleEvent;
import org.jboss.tools.jst.jsp.outline.cssdialog.events.ChangeStyleListener;
@@ -94,7 +69,7 @@
public static final String ID = "org.jboss.tools.jst.jsp.outline.cssdialog.CSSClassDialog"; //$NON-NLS-1$
private static String notUsed = "not_used"; //$NON-NLS-1$
- private final static String[] fileExtensions = { Util.CSS_FILE_EXTENTION };
+// private final static String[] fileExtensions = { Util.CSS_FILE_EXTENTION };
private Composite browserContainer = null;
private Browser browser = null;
@@ -108,7 +83,7 @@
// css style classes
private Combo classCombo;
// combo box content assist
- private ContentAssistCommandAdapter contentAssistAdapter = null;
+// private ContentAssistCommandAdapter contentAssistAdapter = null;
// apply button
private Button applyButton;
@@ -126,7 +101,7 @@
private boolean styleChanged = false;
- private boolean keyInputSelector = false;
+// private boolean keyInputSelector = false;
// Status variables for the possible errors on this page.
// 1. timeStatus holds an error if CSS file is not specified
@@ -141,11 +116,11 @@
private final boolean callFromWizard;
// this job is used to correctly process change style class combo text with delay
- private UIJob uiJob = null;
+// private UIJob uiJob = null;
// the job name
- private String jobName = "Update CSS Composite"; //$NON-NLS-1$
- // delay for job in milliseconds
- private int delay = 1000;
+// private String jobName = "Update CSS Composite"; //$NON-NLS-1$
+// // delay for job in milliseconds
+// private int delay = 1000;
/**
* Constructor.
@@ -306,16 +281,16 @@
// add content assist to style COMBO component
SimpleContentProposalProvider proposalProvider = new SimpleContentProposalProvider(classCombo.getItems());
proposalProvider.setFiltering(true);
- contentAssistAdapter = new ContentAssistCommandAdapter(
- classCombo, new ComboContentAdapter(), proposalProvider, null, null, true);
- contentAssistAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
- contentAssistAdapter.addContentProposalListener(new IContentProposalListener() {
- public void proposalAccepted(IContentProposal proposal) {
- cssStyleClassChanged();
- applyButton.setEnabled(false);
- keyInputSelector = false;
- }
- });
+// contentAssistAdapter = new ContentAssistCommandAdapter(
+// classCombo, new ComboContentAdapter(), proposalProvider, null, null, true);
+// contentAssistAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
+// contentAssistAdapter.addContentProposalListener(new IContentProposalListener() {
+// public void proposalAccepted(IContentProposal proposal) {
+// cssStyleClassChanged();
+// applyButton.setEnabled(false);
+// keyInputSelector = false;
+// }
+// });
split.setWeights(new int[]{15, 85});
split.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, true));
@@ -476,7 +451,7 @@
|| (currentClassStyle == null && classCombo.getText().trim().equals(Constants.EMPTY))) {
return;
}
- notifyStyleClassChanged();
+ cssStyleClassChanged();
applyButton.setEnabled(false);
}
});
@@ -522,42 +497,42 @@
// end select it
classCombo.select(classCombo.getItemCount() - 1);
}
- /**
- * This method is invoked to correctly process class style combo modify event.
- */
- private void notifyStyleClassChanged() {
- Display display = null;
- if (PlatformUI.isWorkbenchRunning()) {
- display = PlatformUI.getWorkbench().getDisplay();
- }
- if (display != null && (Thread.currentThread() == display.getThread())) {
- if (uiJob == null) {
- uiJob = new UIJob(jobName) {
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
- monitor.beginTask(jobName, IProgressMonitor.UNKNOWN);
+// /**
+// * This method is invoked to correctly process class style combo modify event.
+// */
+// private void notifyStyleClassChanged() {
+// Display display = null;
+// if (PlatformUI.isWorkbenchRunning()) {
+// display = PlatformUI.getWorkbench().getDisplay();
+// }
+// if (display != null && (Thread.currentThread() == display.getThread())) {
+// if (uiJob == null) {
+// uiJob = new UIJob(jobName) {
+// @Override
+// public IStatus runInUIThread(IProgressMonitor monitor) {
+// if (monitor.isCanceled()) {
+// return Status.CANCEL_STATUS;
+// }
+// monitor.beginTask(jobName, IProgressMonitor.UNKNOWN);
+//
+// // start operation
+// cssStyleClassChanged();
+// // end operation
+//
+// monitor.done();
+//
+// return Status.OK_STATUS;
+// }
+// };
+// }
+//
+// uiJob.setPriority(Job.SHORT);
+// uiJob.schedule(delay);
+//
+// return;
+// }
+// }
- // start operation
- cssStyleClassChanged();
- // end operation
-
- monitor.done();
-
- return Status.OK_STATUS;
- }
- };
- }
-
- uiJob.setPriority(Job.SHORT);
- uiJob.schedule(delay);
-
- return;
- }
- }
-
/**
* This method is used to create custom button panel.
*
@@ -945,13 +920,13 @@
}
}
}
- /**
- * Create a message string for user
- * @param currentFile
- * @return
- */
- private static final String getMessageForSaveDialog(IFile currentFile){
- String userMessage ="'" + currentFile.getFullPath().toOSString() + "' " + JstUIMessages.CSS_SAVE_DIALOG_MESSAGE; //$NON-NLS-1$//$NON-NLS-2$
- return userMessage;
- }
+// /**
+// * Create a message string for user
+// * @param currentFile
+// * @return
+// */
+// private static final String getMessageForSaveDialog(IFile currentFile){
+// String userMessage ="'" + currentFile.getFullPath().toOSString() + "' " + JstUIMessages.CSS_SAVE_DIALOG_MESSAGE; //$NON-NLS-1$//$NON-NLS-2$
+// return userMessage;
+// }
}
Modified: branches/jbosstools-3.0.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java
===================================================================
--- branches/jbosstools-3.0.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java 2009-03-02 05:58:08 UTC (rev 13908)
+++ branches/jbosstools-3.0.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java 2009-03-02 13:00:09 UTC (rev 13909)
@@ -114,8 +114,7 @@
if(listKeys.size()==0) {
label = new Label(this, SWT.CENTER);
label.setText(JstUIMessages.CSS_NO_EDITED_PROPERTIES);
- }
- System.out.println();
+ }
Collections.sort(listKeys);
updateDataFromStyleAttributes = true;
for (String key : listKeys) {
15 years, 9 months
JBoss Tools SVN: r13908 - in trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui: internal/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-03-02 00:58:08 -0500 (Mon, 02 Mar 2009)
New Revision: 13908
Modified:
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.java
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.properties
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/wizards/DefaultConnectionWizardPage.java
trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/wizards/NewConnectionWizard.java
Log:
JBIDE-3829 - error handling in JMX ui
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.java
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.java 2009-03-02 04:52:15 UTC (rev 13907)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.java 2009-03-02 05:58:08 UTC (rev 13908)
@@ -24,6 +24,9 @@
public static String DefaultConnectionWizardPage_Username;
public static String DefaultConnectionWizardPage_Password;
public static String DefaultConnectionWizardPage_JMX_URL;
+ public static String DefaultConnectionWizardPage_Blank_Invalid;
+ public static String DefaultConnectionWizardPage_Invalid_Connection;
+ public static String DefaultConnectionWizardPage_Name_In_Use;
public static String DeleteConnection;
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.properties
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.properties 2009-03-02 04:52:15 UTC (rev 13907)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/Messages.properties 2009-03-02 05:58:08 UTC (rev 13908)
@@ -12,6 +12,9 @@
DefaultConnectionWizardPage_Username=Username
DefaultConnectionWizardPage_Password=Password
DefaultConnectionWizardPage_JMX_URL=JMX URL
+DefaultConnectionWizardPage_Blank_Invalid=One or more fields are blank or invalid
+DefaultConnectionWizardPage_Invalid_Connection=The connection could not be created: {0}
+DefaultConnectionWizardPage_Name_In_Use=The connection name is already taken.
AttributeControlFactory_updateButtonTitle=Update
AttributeDetails_title=Attribute Details
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/wizards/DefaultConnectionWizardPage.java
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/wizards/DefaultConnectionWizardPage.java 2009-03-02 04:52:15 UTC (rev 13907)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/wizards/DefaultConnectionWizardPage.java 2009-03-02 05:58:08 UTC (rev 13908)
@@ -88,6 +88,7 @@
}
public DefaultConnectionWizardPage() {
super(_BLANK_);
+ setTitle(Messages.NewConnectionWizard_CreateNewConnection);
setDescription(Messages.DefaultConnectionWizardPage_Description);
}
@@ -246,32 +247,24 @@
userName = userNameText.getText();
password = passwordText.getText();
if (hostText.getText().equals(_BLANK_)) {
- showError("",
- "");
+ showError(Messages.DefaultConnectionWizardPage_Blank_Invalid);
return;
}
try {
InetAddress.getByName(hostText.getText());
} catch (UnknownHostException e) {
- showError("",
- "");
+ showError(e.getMessage());
return;
}
String host = hostText.getText();
if (portText.getText().equals(_BLANK_)) {
- showError("",
- "");
+ showError(Messages.DefaultConnectionWizardPage_Blank_Invalid);
return;
}
int port;
- try {
- port = Integer.parseInt(portText.getText());
- if (port < 1 || port > 0xffff) {
- throw new NumberFormatException();
- }
- } catch (NumberFormatException e) {
- showError("",
- "");
+ port = Integer.parseInt(portText.getText());
+ if (port < 1 || port > 0xffff) {
+ showError(Messages.DefaultConnectionWizardPage_Blank_Invalid);
return;
}
url = "service:jmx:rmi:///jndi/rmi://" + host + ":" + port + "/jmxrmi"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -281,8 +274,7 @@
password = advancedPasswordText.getText();
if (urlText.getText().equals(_BLANK_)) {
- showError("",
- "");
+ showError(Messages.DefaultConnectionWizardPage_Blank_Invalid);
return;
}
url = urlText.getText();
@@ -290,20 +282,31 @@
// now validate name
if( name == null || nameTaken(name)) {
- showError("", "");
+ showError(Messages.DefaultConnectionWizardPage_Name_In_Use);
return;
}
+
+ try {
+ getConnection();
+ } catch( CoreException ce ) {
+ showError(ce.getMessage());
+ return;
+ }
clearMessage();
}
protected void clearMessage() {
setErrorMessage(null);
+ setPageComplete(true);
getContainer().updateMessage();
+ getContainer().updateButtons();
}
- protected void showError(String one, String two) {
- setErrorMessage("There's an error somewhere");
+ protected void showError(String message) {
+ setErrorMessage(message);
+ setPageComplete(false);
getContainer().updateMessage();
+ getContainer().updateButtons();
}
protected boolean nameTaken(String s) {
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/wizards/NewConnectionWizard.java
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/wizards/NewConnectionWizard.java 2009-03-02 04:52:15 UTC (rev 13907)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/wizards/NewConnectionWizard.java 2009-03-02 05:58:08 UTC (rev 13908)
@@ -86,7 +86,7 @@
if( active != null ) {
if( active.length > 0 ) {
if( active[active.length-1] == getContainer().getCurrentPage())
- return true;
+ return super.canFinish();
return false;
}
}
@@ -142,7 +142,7 @@
TreeViewer viewer;
public FirstPage() {
super(Messages.NewConnectionWizard);
- setDescription(Messages.NewConnectionWizard_CreateNewConnection);
+ setTitle(Messages.NewConnectionWizard_CreateNewConnection);
}
public void createControl(Composite parent) {
Composite main = new Composite(parent, SWT.NONE);
15 years, 9 months
JBoss Tools SVN: r13907 - in branches/jbosstools-3.0.x/as/plugins: org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-03-01 23:52:15 -0500 (Sun, 01 Mar 2009)
New Revision: 13907
Modified:
branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
Log:
JBIDE-3867 - duplicate runtime names
Modified: branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
===================================================================
--- branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2009-03-02 04:43:11 UTC (rev 13906)
+++ branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2009-03-02 04:52:15 UTC (rev 13907)
@@ -55,6 +55,10 @@
private String getNextRuntimeName() {
String version = getRuntime().getRuntimeType().getVersion();
String base = Messages.jboss + " " + version + " " + Messages.runtime;
+ return getNextRuntimeName(base);
+ }
+
+ public static String getNextRuntimeName(String base) {
IRuntime rt = ServerCore.findRuntime(base);
if (rt == null)
return base;
Modified: branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
===================================================================
--- branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2009-03-02 04:43:11 UTC (rev 13906)
+++ branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2009-03-02 04:52:15 UTC (rev 13907)
@@ -65,6 +65,7 @@
import org.eclipse.wst.server.ui.wizard.WizardFragment;
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.util.JBossServerType;
import org.jboss.ide.eclipse.as.core.util.ServerBeanLoader;
import org.jboss.ide.eclipse.as.ui.IPreferenceKeys;
@@ -161,6 +162,7 @@
String oldName = r.getName();
if( r.isWorkingCopy() ) {
String newName = oldName.replace("Enterprise Application Platform", "EAP");
+ newName = LocalJBossServerRuntime.getNextRuntimeName(newName);
((IRuntimeWorkingCopy)r).setName(newName);
}
15 years, 9 months
JBoss Tools SVN: r13906 - in trunk/as/plugins: org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-03-01 23:43:11 -0500 (Sun, 01 Mar 2009)
New Revision: 13906
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
Log:
JBIDE-3867 - EAP runtime not incrementing
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2009-02-28 17:22:01 UTC (rev 13905)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2009-03-02 04:43:11 UTC (rev 13906)
@@ -55,6 +55,10 @@
private String getNextRuntimeName() {
String version = getRuntime().getRuntimeType().getVersion();
String base = Messages.jboss + " " + version + " " + Messages.runtime;
+ return getNextRuntimeName(base);
+ }
+
+ public static String getNextRuntimeName(String base) {
IRuntime rt = ServerCore.findRuntime(base);
if (rt == null)
return base;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2009-02-28 17:22:01 UTC (rev 13905)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2009-03-02 04:43:11 UTC (rev 13906)
@@ -65,6 +65,7 @@
import org.eclipse.wst.server.ui.wizard.WizardFragment;
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.util.JBossServerType;
import org.jboss.ide.eclipse.as.core.util.ServerBeanLoader;
import org.jboss.ide.eclipse.as.ui.IPreferenceKeys;
@@ -161,6 +162,7 @@
String oldName = r.getName();
if( r.isWorkingCopy() ) {
String newName = oldName.replace("Enterprise Application Platform", "EAP");
+ newName = LocalJBossServerRuntime.getNextRuntimeName(newName);
((IRuntimeWorkingCopy)r).setName(newName);
}
15 years, 9 months