JBoss Tools SVN: r28936 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-02-02 14:13:45 -0500 (Wed, 02 Feb 2011)
New Revision: 28936
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/StyleFormatController.java
Log:
https://issues.jboss.org/browse/JBIDE-8220 , reset values from previous execution
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/StyleFormatController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/StyleFormatController.java 2011-02-02 18:11:13 UTC (rev 28935)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/StyleFormatController.java 2011-02-02 19:13:45 UTC (rev 28936)
@@ -31,12 +31,13 @@
public static final String TYPE = "StyleFormat"; //$NON-NLS-1$
protected ToolItem toolItem;
- private String styleString = null;
+ private String styleString;
public StyleFormatController(FormatControllerManager manager, ToolItem toolItem) {
super(manager);
this.toolItem = toolItem;
setToolbarItemEnabled(false);
+ styleString = null;
}
@Override
@@ -51,6 +52,10 @@
@Override
public void handleEvent(Event event) {
+ /*
+ * Reset values from previous execution
+ */
+ styleString = null;
String baseStyle = ""; //$NON-NLS-1$
Node node = manager.getCurrentSelectedNode();
/*
13 years, 11 months
JBoss Tools SVN: r28935 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-02-02 13:11:13 -0500 (Wed, 02 Feb 2011)
New Revision: 28935
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateRSEFromInstanceJob.java
Log:
JBIDE-8131 to trunk
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java 2011-02-02 17:39:29 UTC (rev 28934)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java 2011-02-02 18:11:13 UTC (rev 28935)
@@ -15,6 +15,7 @@
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.Job;
@@ -119,6 +120,9 @@
status = connect(service, monitor);
monitor.done();
return status;
+ } catch(OperationCanceledException oce) {
+ monitor.done();
+ return Status.CANCEL_STATUS;
} catch(Exception e) {
count += 1000;
monitor.worked(1000);
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateRSEFromInstanceJob.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateRSEFromInstanceJob.java 2011-02-02 17:39:29 UTC (rev 28934)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateRSEFromInstanceJob.java 2011-02-02 18:11:13 UTC (rev 28935)
@@ -63,7 +63,7 @@
SubProgressMonitor submon = new SubProgressMonitor(monitor, 90);
initialConnect(host);
- RSEUtils.connect(RSEUtils.getConnectorService(host), 90000, submon);
+ return RSEUtils.connect(RSEUtils.getConnectorService(host), 90000, submon);
} catch (Exception e) {
return ErrorUtils.handleError(Messages.ERROR,
NLS.bind(Messages.COULD_NOT_LAUNCH_RSE_EXPLORER2, instance.getName()),
13 years, 11 months
JBoss Tools SVN: r28934 - in branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-02-02 12:39:29 -0500 (Wed, 02 Feb 2011)
New Revision: 28934
Modified:
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateRSEFromInstanceJob.java
Log:
JBIDE-8131 to cr2
Modified: branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java
===================================================================
--- branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java 2011-02-02 17:31:31 UTC (rev 28933)
+++ branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java 2011-02-02 17:39:29 UTC (rev 28934)
@@ -15,6 +15,7 @@
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.Job;
@@ -119,6 +120,9 @@
status = connect(service, monitor);
monitor.done();
return status;
+ } catch(OperationCanceledException oce) {
+ monitor.done();
+ return Status.CANCEL_STATUS;
} catch(Exception e) {
count += 1000;
monitor.worked(1000);
Modified: branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateRSEFromInstanceJob.java
===================================================================
--- branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateRSEFromInstanceJob.java 2011-02-02 17:31:31 UTC (rev 28933)
+++ branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateRSEFromInstanceJob.java 2011-02-02 17:39:29 UTC (rev 28934)
@@ -63,7 +63,7 @@
SubProgressMonitor submon = new SubProgressMonitor(monitor, 90);
initialConnect(host);
- RSEUtils.connect(RSEUtils.getConnectorService(host), 90000, submon);
+ return RSEUtils.connect(RSEUtils.getConnectorService(host), 90000, submon);
} catch (Exception e) {
return ErrorUtils.handleError(Messages.ERROR,
NLS.bind(Messages.COULD_NOT_LAUNCH_RSE_EXPLORER2, instance.getName()),
13 years, 11 months
JBoss Tools SVN: r28933 - branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-02-02 12:31:31 -0500 (Wed, 02 Feb 2011)
New Revision: 28933
Modified:
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/SecurePasswordStore.java
Log:
[JBIDE-8250]
Modified: branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/SecurePasswordStore.java
===================================================================
--- branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/SecurePasswordStore.java 2011-02-02 17:31:01 UTC (rev 28932)
+++ branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/SecurePasswordStore.java 2011-02-02 17:31:31 UTC (rev 28933)
@@ -100,7 +100,7 @@
if (password == null) {
return null;
}
- return EncodingUtils.encodeBase64(password.getBytes());
+ return new String(EncodingUtils.decodeBase64(password));
}
private void storeInPreferences(String password, IStorageKey key) throws DeltaCloudException {
13 years, 11 months
JBoss Tools SVN: r28932 - trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-02-02 12:31:01 -0500 (Wed, 02 Feb 2011)
New Revision: 28932
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
Log:
JBIDE-8261 - trunk
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2011-02-02 17:29:17 UTC (rev 28931)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2011-02-02 17:31:01 UTC (rev 28932)
@@ -30,6 +30,7 @@
import org.jboss.ide.eclipse.as.core.publishers.AbstractPublishMethod;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IJBoss6Server;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
@@ -74,12 +75,14 @@
protected void startDeploymentScanner() {
String cmd = getDeploymentScannerCommand(new NullProgressMonitor(), true);
- RSELaunchDelegate.launchCommandNoResult((JBossServerBehavior)behaviour, 1000, cmd);
+ if( cmd != null )
+ RSELaunchDelegate.launchCommandNoResult((JBossServerBehavior)behaviour, 1000, cmd);
}
protected void stopDeploymentScanner() {
String cmd = getDeploymentScannerCommand(new NullProgressMonitor(), false);
- RSELaunchDelegate.launchCommandNoResult((JBossServerBehavior)behaviour, 1000, cmd);
+ if( cmd != null )
+ RSELaunchDelegate.launchCommandNoResult((JBossServerBehavior)behaviour, 1000, cmd);
}
protected String getDeploymentScannerCommand(IProgressMonitor monitor, boolean start) {
@@ -87,11 +90,26 @@
// jboss.deployment:flavor=URL,type=DeploymentScanner start
IPath home = new Path(RSEUtils.getRSEHomeDir(behaviour.getServer()));
IPath twiddle = home.append(IJBossRuntimeResourceConstants.BIN).append(IJBossRuntimeResourceConstants.TWIDDLE_SH);
-
- String cmd = twiddle.toString() + " -s " + getServer().getHost() + " -u " + getJBossServer().getUsername()
- + " -p " + getJBossServer().getPassword() + " invoke jboss.deployment:flavor=URL,type=DeploymentScanner "
- + (start ? "start" : "stop");
- return cmd;
+
+ JBossServer jbs = (JBossServer)behaviour.getServer().loadAdapter(JBossServer.class, new NullProgressMonitor());
+ if( jbs != null ) {
+ String runtimeTypeId = jbs.getRuntime().getRuntime().getRuntimeType().getId();
+ String serverUrl;
+ if (runtimeTypeId.equals(IJBossToolingConstants.AS_60)){
+ IJBoss6Server server6 = (IJBoss6Server)jbs.getServer().loadAdapter(IJBoss6Server.class, new NullProgressMonitor());
+ serverUrl = "service:jmx:rmi:///jndi/rmi://" + jbs.getHost() + ":" + server6.getJMXRMIPort() + "/jmxrmi"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ } else {
+ serverUrl = jbs.getHost() + ":" + jbs.getJNDIPort(); //$NON-NLS-1$
+ }
+
+ String cmd = twiddle.toString() + " -s " + serverUrl +
+ " -u " + getJBossServer().getUsername() +
+ " -p " + getJBossServer().getPassword() +
+ " invoke jboss.deployment:flavor=URL,type=DeploymentScanner "
+ + (start ? "start" : "stop");
+ return cmd;
+ }
+ return null;
}
protected JBossServer getJBossServer() {
13 years, 11 months
JBoss Tools SVN: r28931 - branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-02-02 12:29:17 -0500 (Wed, 02 Feb 2011)
New Revision: 28931
Modified:
branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
Log:
JBIDE-8261 - to branch cr2
Modified: branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
===================================================================
--- branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2011-02-02 16:26:33 UTC (rev 28930)
+++ branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2011-02-02 17:29:17 UTC (rev 28931)
@@ -30,6 +30,7 @@
import org.jboss.ide.eclipse.as.core.publishers.AbstractPublishMethod;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IJBoss6Server;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
@@ -74,12 +75,14 @@
protected void startDeploymentScanner() {
String cmd = getDeploymentScannerCommand(new NullProgressMonitor(), true);
- RSELaunchDelegate.launchCommandNoResult((JBossServerBehavior)behaviour, 1000, cmd);
+ if( cmd != null )
+ RSELaunchDelegate.launchCommandNoResult((JBossServerBehavior)behaviour, 1000, cmd);
}
protected void stopDeploymentScanner() {
String cmd = getDeploymentScannerCommand(new NullProgressMonitor(), false);
- RSELaunchDelegate.launchCommandNoResult((JBossServerBehavior)behaviour, 1000, cmd);
+ if( cmd != null )
+ RSELaunchDelegate.launchCommandNoResult((JBossServerBehavior)behaviour, 1000, cmd);
}
protected String getDeploymentScannerCommand(IProgressMonitor monitor, boolean start) {
@@ -87,11 +90,26 @@
// jboss.deployment:flavor=URL,type=DeploymentScanner start
IPath home = new Path(RSEUtils.getRSEHomeDir(behaviour.getServer()));
IPath twiddle = home.append(IJBossRuntimeResourceConstants.BIN).append(IJBossRuntimeResourceConstants.TWIDDLE_SH);
-
- String cmd = twiddle.toString() + " -s " + getServer().getHost() + " -u " + getJBossServer().getUsername()
- + " -p " + getJBossServer().getPassword() + " invoke jboss.deployment:flavor=URL,type=DeploymentScanner "
- + (start ? "start" : "stop");
- return cmd;
+
+ JBossServer jbs = (JBossServer)behaviour.getServer().loadAdapter(JBossServer.class, new NullProgressMonitor());
+ if( jbs != null ) {
+ String runtimeTypeId = jbs.getRuntime().getRuntime().getRuntimeType().getId();
+ String serverUrl;
+ if (runtimeTypeId.equals(IJBossToolingConstants.AS_60)){
+ IJBoss6Server server6 = (IJBoss6Server)jbs.getServer().loadAdapter(IJBoss6Server.class, new NullProgressMonitor());
+ serverUrl = "service:jmx:rmi:///jndi/rmi://" + jbs.getHost() + ":" + server6.getJMXRMIPort() + "/jmxrmi"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ } else {
+ serverUrl = jbs.getHost() + ":" + jbs.getJNDIPort(); //$NON-NLS-1$
+ }
+
+ String cmd = twiddle.toString() + " -s " + serverUrl +
+ " -u " + getJBossServer().getUsername() +
+ " -p " + getJBossServer().getPassword() +
+ " invoke jboss.deployment:flavor=URL,type=DeploymentScanner "
+ + (start ? "start" : "stop");
+ return cmd;
+ }
+ return null;
}
protected JBossServer getJBossServer() {
13 years, 11 months
JBoss Tools SVN: r28930 - in trunk: jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2011-02-02 11:26:33 -0500 (Wed, 02 Feb 2011)
New Revision: 28930
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/i18n/JsfLocaleProvider.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ILocaleProvider.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/MainLocaleProvider.java
Log:
https://issues.jboss.org/browse/JBIDE-7003 refactoring of bundle map
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/i18n/JsfLocaleProvider.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/i18n/JsfLocaleProvider.java 2011-02-02 16:19:50 UTC (rev 28929)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/i18n/JsfLocaleProvider.java 2011-02-02 16:26:33 UTC (rev 28930)
@@ -40,7 +40,11 @@
*/
public Locale getLocale(ITextEditor editor) {
IEditorInput editorInput = editor.getEditorInput();
- return getLocale(editorInput);
+ IProject fileProject = null;
+ if (editorInput instanceof IFileEditorInput) {
+ fileProject=((IFileEditorInput)editorInput).getFile().getProject();
+ }
+ return getLocale(fileProject);
}
public String getLocaleString() {
@@ -48,10 +52,9 @@
}
@Override
- public Locale getLocale(IEditorInput editorInput) {
- if (editorInput instanceof IFileEditorInput) {
- IProject project = ((IFileEditorInput)editorInput)
- .getFile().getProject();
+ public Locale getLocale(IProject project) {
+ if (project !=null) {
+
IModelNature modelNature = EclipseResourceUtil.getModelNature(project);
if (modelNature == null) {
return null;
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java 2011-02-02 16:19:50 UTC (rev 28929)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java 2011-02-02 16:26:33 UTC (rev 28930)
@@ -74,20 +74,24 @@
IVpePreferencesPage.SHOW_RESOURCE_BUNDLES_USAGE_AS_EL);
XModelTreeListener modelListener = new ML();
- private IEditorInput editorInput =null;
private IProject project;
public void init(IEditorInput input){
- this.editorInput = input;
-
- if (getEditorInput() instanceof IFileEditorInput) {
- this.project = ((IFileEditorInput)getEditorInput()).getFile().getProject();
+ IProject fileProject=null;
+ if (input instanceof IFileEditorInput) {
+ fileProject=((IFileEditorInput)input).getFile().getProject();
+ }
+ init(fileProject);
+ }
+
+ public void init(IProject project){
+ if (project!=null) {
javaSources = getJavaProjectSrcLocations(project);
}
/*
* Initialize the locale with default value.
*/
- locale = MainLocaleProvider.getInstance().getLocale(getEditorInput());
+ locale = MainLocaleProvider.getInstance().getLocale(project);
refreshRegisteredBundles();
PreferenceModelUtilities.getPreferenceModel().addModelTreeListener(modelListener);
}
@@ -660,7 +664,7 @@
return bundles;
}
- private IEditorInput getEditorInput() {
- return editorInput;
- }
+// private IEditorInput getEditorInput() {
+// return editorInput;
+// }
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ILocaleProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ILocaleProvider.java 2011-02-02 16:19:50 UTC (rev 28929)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ILocaleProvider.java 2011-02-02 16:26:33 UTC (rev 28930)
@@ -12,8 +12,7 @@
import java.util.Locale;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.core.resources.IProject;
/**
* This interface is intended for creation extensions of {@code localeProvider}
@@ -26,10 +25,8 @@
* Returns the locale for given {@code editor}. Implementations
* may return {@code null} if they can not determine the locale.
*/
- Locale getLocale(ITextEditor editor);
+ Locale getLocale(IProject project);
- Locale getLocale(IEditorInput editorInput);
-
/**
* Shows the string representation of the locale
* returned by #getLocale(StructuredTextEditor) method.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/MainLocaleProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/MainLocaleProvider.java 2011-02-02 16:19:50 UTC (rev 28929)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/MainLocaleProvider.java 2011-02-02 16:26:33 UTC (rev 28930)
@@ -74,25 +74,14 @@
* {@code localeProvider} extensions. Returns the default
* system locale if nothing found (never returns {@code null}).
*/
- public Locale getLocale(ITextEditor editor) {
- return this.getLocale(editor.getEditorInput());
- }
- /**
- * Tries to determine the locale of the {@code editor} using
- * {@code localeProvider} extensions. Returns the default
- * system locale if nothing found (never returns {@code null}).
- */
- public Locale getLocale(IEditorInput editorInput) {
- if (editorInput instanceof IFileEditorInput) {
- IProject project = ((IFileEditorInput)editorInput)
- .getFile().getProject();
-
+ public Locale getLocale(IProject project) {
+ if (project!=null) {
try {
if(project.isAccessible()) {
String[] natures = project.getDescription().getNatureIds();
for (String natureId : natures) {
for (ILocaleProvider provider : getProviders(natureId)) {
- Locale locale = provider.getLocale(editorInput);
+ Locale locale = provider.getLocale(project);
if (locale != null) {
localeString = provider.getLocaleString();
return locale;
@@ -102,8 +91,7 @@
}
} catch (CoreException e) {
JspEditorPlugin.getPluginLog().logError(
- MessageFormat.format("Error in getting locale for {0}.",((IFileEditorInput)editorInput)
- .getFile().getLocation().toOSString()), e);
+ MessageFormat.format("Error in getting locale for {0}.",project==null?"Couldn't find project":project.getName(), e));
}
}
13 years, 11 months
JBoss Tools SVN: r28929 - trunk/requirements/soap.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-02-02 11:19:50 -0500 (Wed, 02 Feb 2011)
New Revision: 28929
Modified:
trunk/requirements/soap/build.properties
Log:
JBIDE-8055 move to SOA-P 5.1.0.ER9
Modified: trunk/requirements/soap/build.properties
===================================================================
--- trunk/requirements/soap/build.properties 2011-02-02 16:18:20 UTC (rev 28928)
+++ trunk/requirements/soap/build.properties 2011-02-02 16:19:50 UTC (rev 28929)
@@ -10,10 +10,10 @@
soap50.build.archive.md5=b9088f7884c7464419623c596dafe25f
soap50.build.archive.root=jboss-soa-p.5.0.0
-# JBDS-1374, JBIDE-8055 add SOA-P 5.1 - http://jawa05.englab.brq.redhat.com/candidate/SOA-5.1-ER8/unsigned/soa-5....
-soap51.build.uri=http://jawa05.englab.brq.redhat.com/candidate/SOA-5.1-ER8/unsigned/
-soap51.build.name=soa-5.1.0.ER8
+# JBDS-1374, JBIDE-8055 add SOA-P 5.1 - http://jawa05.englab.brq.redhat.com/candidate/SOA-5.1-ER9/unsigned/soa-5....
+soap51.build.uri=http://jawa05.englab.brq.redhat.com/candidate/SOA-5.1-ER9/unsigned/
+soap51.build.name=soa-5.1.0.ER9
soap51.build.archive=${soap51.build.name}.zip
-soap51.build.archive.md5=5a8886b2cbb6633302081c45caa9caca
+soap51.build.archive.md5=9a690c7932a472d3c558706e049f27a6
soap51.build.archive.root=jboss-soa-p.5.1.0
13 years, 11 months
JBoss Tools SVN: r28928 - branches/jbosstools-3.2.x/requirements/soap.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-02-02 11:18:20 -0500 (Wed, 02 Feb 2011)
New Revision: 28928
Modified:
branches/jbosstools-3.2.x/requirements/soap/build.properties
Log:
JBIDE-8055 move to SOA-P 5.1.0.ER9
Modified: branches/jbosstools-3.2.x/requirements/soap/build.properties
===================================================================
--- branches/jbosstools-3.2.x/requirements/soap/build.properties 2011-02-02 15:15:12 UTC (rev 28927)
+++ branches/jbosstools-3.2.x/requirements/soap/build.properties 2011-02-02 16:18:20 UTC (rev 28928)
@@ -10,9 +10,10 @@
soap50.build.archive.md5=b9088f7884c7464419623c596dafe25f
soap50.build.archive.root=jboss-soa-p.5.0.0
-# JBDS-1374, JBIDE-8055 add SOA-P 5.1 - http://jawa05.englab.brq.redhat.com/candidate/SOA-5.1-ER8/unsigned/soa-5....
-soap51.build.uri=http://jawa05.englab.brq.redhat.com/candidate/SOA-5.1-ER8/unsigned/
-soap51.build.name=soa-5.1.0.ER8
+# JBDS-1374, JBIDE-8055 add SOA-P 5.1 - http://jawa05.englab.brq.redhat.com/candidate/SOA-5.1-ER9/unsigned/soa-5....
+soap51.build.uri=http://jawa05.englab.brq.redhat.com/candidate/SOA-5.1-ER9/unsigned/
+soap51.build.name=soa-5.1.0.ER9
soap51.build.archive=${soap51.build.name}.zip
-soap51.build.archive.md5=5a8886b2cbb6633302081c45caa9caca
+soap51.build.archive.md5=9a690c7932a472d3c558706e049f27a6
soap51.build.archive.root=jboss-soa-p.5.1.0
+
13 years, 11 months
JBoss Tools SVN: r28927 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2011-02-02 10:15:12 -0500 (Wed, 02 Feb 2011)
New Revision: 28927
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java
Log:
https://issues.jboss.org/browse/JBIDE-7003 refactoring of bundle map
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java 2011-02-02 15:04:59 UTC (rev 28926)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java 2011-02-02 15:15:12 UTC (rev 28927)
@@ -33,7 +33,6 @@
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.part.FileEditorInput;
import org.jboss.tools.common.el.core.model.ELArgumentInvocation;
import org.jboss.tools.common.el.core.model.ELExpression;
import org.jboss.tools.common.el.core.model.ELInstance;
@@ -76,12 +75,14 @@
XModelTreeListener modelListener = new ML();
private IEditorInput editorInput =null;
+ private IProject project;
public void init(IEditorInput input){
this.editorInput = input;
if (getEditorInput() instanceof IFileEditorInput) {
- javaSources = getJavaProjectSrcLocations(((IFileEditorInput)getEditorInput()).getFile().getProject());
+ this.project = ((IFileEditorInput)getEditorInput()).getFile().getProject();
+ javaSources = getJavaProjectSrcLocations(project);
}
/*
* Initialize the locale with default value.
@@ -93,9 +94,7 @@
public void refreshRegisteredBundles() {
if (hasJsfProjectNatureType()
- && (getEditorInput() instanceof IFileEditorInput)) {
- IProject project = ((IFileEditorInput)getEditorInput())
- .getFile().getProject();
+ && project!=null) {
IModelNature modelNature = EclipseResourceUtil
.getModelNature(project);
if (modelNature != null) {
@@ -151,9 +150,7 @@
private boolean hasJsfProjectNatureType() {
boolean hasJsfProjectNatureType = false;
try {
- IEditorInput ei = getEditorInput();
- if(ei instanceof IFileEditorInput) {
- IProject project = ((IFileEditorInput)ei).getFile().getProject();
+ if(project!=null) {
if (project.exists() && project.isOpen()) {
for (int i = 0; i < JSF_PROJECT_NATURES.length; i++) {
if (project.hasNature(JSF_PROJECT_NATURES[i]))
@@ -192,8 +189,7 @@
if(entry == null){
if (hasJsfProjectNatureType()) {
- if (getEditorInput() instanceof IFileEditorInput) {
- IProject project = ((IFileEditorInput)getEditorInput()).getFile().getProject();
+ if (project!=null) {
XModel model = EclipseResourceUtil.getModelNature(project).getModel();
String prefix2 = prefix;
if(propertyName != null && prefix != null) {
@@ -210,10 +206,9 @@
p.put(WebPromptingProvider.BUNDLE, entry.uri);
p.put(WebPromptingProvider.KEY, propertyName);
if (locale != null) p.put(WebPromptingProvider.LOCALE, locale);
- p.put(WebPromptingProvider.FILE, ((IFileEditorInput)getEditorInput()).getFile().getProject());
+ p.put(WebPromptingProvider.FILE, project);
String error = null;
- if (getEditorInput() instanceof IFileEditorInput) {
- IProject project = ((IFileEditorInput)getEditorInput()).getFile().getProject();
+ if (project!=null) {
XModel model = EclipseResourceUtil.getModelNature(project).getModel();
WebPromptingProvider.getInstance().getList(model, WebPromptingProvider.JSF_OPEN_KEY, entry.uri, p);
error = p.getProperty(WebPromptingProvider.ERROR);
@@ -231,8 +226,6 @@
* @return the bundle file
*/
public IFile getBundleFile(String uri){
- IEditorInput input = getEditorInput();
- IProject project = ((FileEditorInput)input).getFile().getProject();
if(project == null || !project.isOpen()) {
return null;
}
@@ -389,9 +382,8 @@
public void refresh(){
refreshRegisteredBundles();
- IEditorInput input = getEditorInput();
- if (input instanceof IFileEditorInput) {
- javaSources = getJavaProjectSrcLocations(((IFileEditorInput)input).getFile().getProject());
+ if (project!=null) {
+ javaSources = getJavaProjectSrcLocations(project);
UsedKey key;
UsedKey[] array = new UsedKey[0];
array = usedKeys.values().toArray(array);
@@ -671,5 +663,4 @@
private IEditorInput getEditorInput() {
return editorInput;
}
-
}
13 years, 11 months