JBoss Tools SVN: r36858 - in trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog: tabs and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-12-01 20:34:15 -0500 (Thu, 01 Dec 2011)
New Revision: 36858
Modified:
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/ImageSelectionDialog.java
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/tabs/BaseTabControl.java
Log:
JBIDE-10229
https://issues.jboss.org/browse/JBIDE-10229
GC is disposed correctly and initial selection is set.
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/ImageSelectionDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/ImageSelectionDialog.java 2011-12-02 01:05:44 UTC (rev 36857)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/ImageSelectionDialog.java 2011-12-02 01:34:15 UTC (rev 36858)
@@ -596,83 +596,84 @@
resolution.setVisible(false);
emptyColor = canvas.getForeground();
-
+ List<?> list = getInitialElementSelections();
+ if(!list.isEmpty()) {
+ Object o = list.iterator().next();
+ if(o instanceof IFile) {
+ file = (IFile)o;
+ }
+ }
canvas.addPaintListener(new PaintListener() {
public void paintControl(PaintEvent e) {
GC gc = new GC(canvas);
- gc.setForeground(emptyColor);
- gc.fillRectangle(1, 1, canvas.getSize().x - 2, canvas.getSize().y - 2);
- // resolution.setText("");
- resolution.setVisible(false);
+ try {
+ gc.setForeground(emptyColor);
+ gc.fillRectangle(1, 1, canvas.getSize().x - 2, canvas.getSize().y - 2);
+ //resolution.setText("");
+ resolution.setVisible(false);
- if (file != null) {
- Cursor parentCursor = getShell().getCursor();
- final Cursor waitCursor = new Cursor(getShell().getDisplay(), SWT.CURSOR_WAIT);
- Point previewPoint = new Point(0, 0);
- Point labelPoint = canvas.getSize();
- InputStream stream = null;
+ if (file != null) {
+ Cursor parentCursor = getShell().getCursor();
+ final Cursor waitCursor = new Cursor(getShell().getDisplay(), SWT.CURSOR_WAIT);
+ Point previewPoint = new Point(0, 0);
+ Point labelPoint = canvas.getSize();
+ InputStream stream = null;
- try {
- getShell().setCursor(waitCursor);
- stream = new FileInputStream(file.getLocation().toOSString());
+ try {
+ getShell().setCursor(waitCursor);
+ stream = new FileInputStream(file.getLocation().toOSString());
- ImageData imageData = new ImageData(stream);
- stream.close();
+ ImageData imageData = new ImageData(stream);
+ stream.close();
- if (imageData != null) {
- Image image = new Image(getShell().getDisplay(), imageData);
+ if (imageData != null) {
+ Image image = new Image(getShell().getDisplay(), imageData);
- // set image in center
- Point imagePoint = new Point(image.getBounds().width,
+ // set image in center
+ Point imagePoint = new Point(image.getBounds().width,
image.getBounds().height);
- String imageInfo = imagePoint.x + " x " + imagePoint.y + " px"; //$NON-NLS-1$ //$NON-NLS-2$
+ String imageInfo = imagePoint.x + " x " + imagePoint.y + " px"; //$NON-NLS-1$ //$NON-NLS-2$
- // change resolution if image anymore image label
- if ((imagePoint.x > labelPoint.x) || (imagePoint.y > labelPoint.y)) {
- float ratioImage = (float) imagePoint.x / (float) imagePoint.y;
+ // change resolution if image anymore image label
+ if ((imagePoint.x > labelPoint.x) || (imagePoint.y > labelPoint.y)) {
+ float ratioImage = (float) imagePoint.x / (float) imagePoint.y;
- if (((imagePoint.y > labelPoint.y) &&
+ if (((imagePoint.y > labelPoint.y) &&
((labelPoint.y * ratioImage) > labelPoint.x)) ||
((imagePoint.x > labelPoint.x) &&
((labelPoint.x / ratioImage) < labelPoint.y))) {
- imageData = imageData.scaledTo(labelPoint.x - 10,
+ imageData = imageData.scaledTo(labelPoint.x - 10,
(int) (labelPoint.x / ratioImage));
- } else {
- imageData = imageData.scaledTo((int) (labelPoint.y * ratioImage) -
+ } else {
+ imageData = imageData.scaledTo((int) (labelPoint.y * ratioImage) -
10, labelPoint.y);
- }
+ }
- image.dispose();
- image = new Image(getShell().getDisplay(), imageData);
- imagePoint.x = image.getBounds().width;
- imagePoint.y = image.getBounds().height;
- }
+ image.dispose();
+ image = new Image(getShell().getDisplay(), imageData);
+ imagePoint.x = image.getBounds().width;
+ imagePoint.y = image.getBounds().height;
+ }
- previewPoint.x = (labelPoint.x / 2) - (imagePoint.x / 2);
- previewPoint.y = (labelPoint.y / 2) - (imagePoint.y / 2);
- gc.drawImage(image, previewPoint.x, previewPoint.y);
- resolution.setVisible(true);
- resolution.setText(imageInfo);
- image.dispose();
- gc.dispose();
- }
- } catch (IOException ev) {
- //ignore
- } catch (SWTException ex) {
- //ignore (if select not image file)
- } finally {
- getShell().setCursor(parentCursor);
-
- if (stream != null) {
- try {
- stream.close();
- } catch (IOException e1) {
- // ignore
- }
- }
- }
- }
+ previewPoint.x = (labelPoint.x / 2) - (imagePoint.x / 2);
+ previewPoint.y = (labelPoint.y / 2) - (imagePoint.y / 2);
+ gc.drawImage(image, previewPoint.x, previewPoint.y);
+ resolution.setVisible(true);
+ resolution.setText(imageInfo);
+ image.dispose();
+ }
+ } catch (IOException ev) {
+ //ignore
+ } catch (SWTException ex) {
+ //ignore (if select not image file)
+ } finally {
+ getShell().setCursor(parentCursor);
+ }
+ }
+ } finally {
+ gc.dispose();
+ }
}
});
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/tabs/BaseTabControl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/tabs/BaseTabControl.java 2011-12-02 01:05:44 UTC (rev 36857)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/tabs/BaseTabControl.java 2011-12-02 01:34:15 UTC (rev 36858)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.jst.css.dialog.tabs;
-import java.io.IOException;
import java.util.List;
import java.util.Map;
@@ -19,6 +18,7 @@
import org.eclipse.core.databinding.observable.Observables;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
@@ -43,11 +43,11 @@
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.jboss.tools.common.web.WebUtils;
import org.jboss.tools.jst.css.CSSPlugin;
import org.jboss.tools.jst.css.dialog.FontFamilyDialog;
import org.jboss.tools.jst.css.dialog.ImageSelectionDialog;
@@ -262,15 +262,51 @@
dialog.setAllowMultiple(false);
dialog.setInput(project);
+ IFile pageFile = getPageFile();
+ String text = combo.getText();
+ if(pageFile != null && text != null && text.length() > 0) {
+ if(text.startsWith("url(") && text.endsWith(")")) {
+ text = text.substring(4, text.length() - 1);
+ }
+ text = text.replace('\\', '/');
+ IPath path = pageFile.getFullPath().removeLastSegments(1);
+ IFile selectedFile = null;
+ if(text.startsWith("/")) {
+ IPath[] paths = WebUtils.getWebContentPaths(pageFile.getProject());
+ for (IPath p: paths) {
+ selectedFile = ResourcesPlugin.getWorkspace().getRoot().getFile(p.append(text.substring(1)));
+ if(!selectedFile.exists()) {
+ selectedFile = null;
+ } else {
+ break;
+ }
+ }
+ }
+ if(selectedFile == null) {
+ while(true) {
+ if(path.segmentCount() < 2) break;
+ if(text.startsWith("/")) {
+ text = text.substring(1);
+ } else if(text.startsWith("./")) {
+ text = text.substring(2);
+ } else if(text.startsWith("../")) {
+ text = text.substring(3);
+ path = path.removeLastSegments(1);
+ } else {
+ break;
+ }
+ }
+ path = path.append(text);
+ selectedFile = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ }
+ if(selectedFile.exists()) {
+ dialog.setInitialSelection(selectedFile);
+ }
+ }
+
if (dialog.open() == ImageSelectionDialog.OK) {
- IFile imageFile = (IFile) dialog.getFirstResult();
- IWorkbenchPage page = CSSPlugin.getDefault().getWorkbench()
- .getActiveWorkbenchWindow().getActivePage();
- if (page != null
- && page.getActiveEditor() != null
- && page.getActiveEditor().getEditorInput() instanceof IFileEditorInput ) {
- IEditorInput input = page.getActiveEditor().getEditorInput();
- IFile pageFile = ((IFileEditorInput) input).getFile();
+ if(pageFile != null) {
+ IFile imageFile = (IFile) dialog.getFirstResult();
String relativePath = BaseTabControl.computeRelativePath(pageFile, imageFile);
combo.add(relativePath);
combo.setText(relativePath);
@@ -298,6 +334,17 @@
return wrapper;
}
+ private IFile getPageFile() {
+ IWorkbenchPage page = CSSPlugin.getDefault().getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage();
+ if (page != null
+ && page.getActiveEditor() != null
+ && page.getActiveEditor().getEditorInput() instanceof IFileEditorInput ) {
+ return ((IFileEditorInput) page.getActiveEditor().getEditorInput()).getFile();
+ }
+ return null;
+ }
+
/**
* Build a relative path to the given base path.
*
13 years, 1 month
JBoss Tools SVN: r36857 - trunk/birt/plugins/org.jboss.tools.birt.oda/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-12-01 20:05:44 -0500 (Thu, 01 Dec 2011)
New Revision: 36857
Modified:
trunk/birt/plugins/org.jboss.tools.birt.oda/META-INF/MANIFEST.MF
Log:
fix birt oda compilation errors after merging hibernate multiversion into trunk
Modified: trunk/birt/plugins/org.jboss.tools.birt.oda/META-INF/MANIFEST.MF
===================================================================
--- trunk/birt/plugins/org.jboss.tools.birt.oda/META-INF/MANIFEST.MF 2011-12-02 00:50:58 UTC (rev 36856)
+++ trunk/birt/plugins/org.jboss.tools.birt.oda/META-INF/MANIFEST.MF 2011-12-02 01:05:44 UTC (rev 36857)
@@ -12,6 +12,7 @@
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.datatools.connectivity.oda;bundle-version="[3.1.0,4.0.0)",
org.eclipse.datatools.connectivity.oda.profile;bundle-version="[3.0.4,4.0.0)",
+ org.hibernate.eclipse.libs;bundle-version="3.4.0";resolution:=optional,
org.hibernate.eclipse;resolution:=optional
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
13 years, 1 month
JBoss Tools SVN: r36856 - in trunk/common/plugins/org.jboss.tools.common.ui: icons and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-12-01 19:50:58 -0500 (Thu, 01 Dec 2011)
New Revision: 36856
Added:
trunk/common/plugins/org.jboss.tools.common.ui/icons/jboss16.png
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml
Log:
Updated JBoss Perspective icon
Added: trunk/common/plugins/org.jboss.tools.common.ui/icons/jboss16.png
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/icons/jboss16.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml 2011-12-02 00:28:04 UTC (rev 36855)
+++ trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml 2011-12-02 00:50:58 UTC (rev 36856)
@@ -50,7 +50,7 @@
point="org.eclipse.ui.perspectives">
<perspective
class="org.jboss.tools.common.ui.JBossPerspectiveFactory"
- icon="$nl$/icons/jboss16.gif"
+ icon="$nl$/icons/jboss16.png"
id="org.jboss.tools.common.ui.JBossPerspective"
name="%perspective.name">
</perspective>
13 years, 1 month
JBoss Tools SVN: r36855 - in trunk/openshift/docs/reference/en-US: images and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-12-01 19:28:04 -0500 (Thu, 01 Dec 2011)
New Revision: 36855
Added:
trunk/openshift/docs/reference/en-US/Creating_an_OpenShift_Express_Application.xml
trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/
trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_01.png
trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_02.png
trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_03.png
trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_04.png
trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_05.png
trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_06.png
trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_07.png
trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_08.png
Log:
updated with new info for JBIDE-9793
Added: trunk/openshift/docs/reference/en-US/Creating_an_OpenShift_Express_Application.xml
===================================================================
--- trunk/openshift/docs/reference/en-US/Creating_an_OpenShift_Express_Application.xml (rev 0)
+++ trunk/openshift/docs/reference/en-US/Creating_an_OpenShift_Express_Application.xml 2011-12-02 00:28:04 UTC (rev 36855)
@@ -0,0 +1,182 @@
+<?xml version='1.0' encoding='utf-8' ?>
+
+ <chapter id="chap-OpenSift_Tools_Reference_Guide-Creating_an_OpenShift_Express_Application">
+ <title>Creating an OpenShift Express Application</title>
+ <para>
+ From the workbench go to <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New</guimenuitem><guimenuitem>Other</guimenuitem></menuchoice>.
+ </para>
+ <figure id="application_creation_01">
+ <title>Selecting the OpenShift Express Application wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Creating_an_OpenShift_Express_Application/application_creation_01.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Wizard selection screen with the OpenShift Express Application wizard selected.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ In the wizard, go to and select <menuchoice><guimenuitem>OpenShift</guimenuitem><guimenuitem>OpenShift Express Application</guimenuitem></menuchoice>. With the wizard choice selected, click on the <guibutton>Next</guibutton> button.
+ </para>
+ <figure id="application_creation_02">
+ <title>Validating OpenShift credentials</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Creating_an_OpenShift_Express_Application/application_creation_02.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Sever connection screen where you will validate your username and password for OpenShift or you can sign up for an account.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ If you have already signed up for an OpenShift Express account then you can input your <guilabel>Username</guilabel> and <guilabel>Password</guilabel> here and click <guilabel>Validate</guilabel>. If validation is successful you will see the button is now unavailable and no error was presented.
+ </para>
+ <para>
+ If you do not have an OpenShift Express account, you can create one through the link at the top of the wizard screen. This will open the OpenShift sign-up page within your workbench. Once you have created an account you will need to relaunch the <guilabel>OpenShift Express Application</guilabel> wizard and input your new username and password.
+ </para>
+ <para>
+ Click the <guibutton>Next</guibutton> button to proceed.
+ </para>
+ <figure id="application_creation_03">
+ <title>Setting the domain name</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Creating_an_OpenShift_Express_Application/application_creation_03.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Creating a domain name or inserting one that already exists for your OpenShift account.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ If you already have a domain name then you can type this into the <guilabel>Domain name</guilabel> field.
+ </para>
+ <para>
+ If you need to create a domain, type the name you wish to have into the <guilabel>Domain name</guilabel> field and click the <guibutton>Create</guibutton> button. After clicking <guibutton>Create</guibutton>, you will need to provide your public SSH key. You will need to ensure that the paired private key is listed within the SSH2 Preferences. If you are unsure, click the <guilabel>SSH2 Preferences</guilabel> link in the window. Click <guibutton>Finish</guibutton> to complete domain creation.
+ </para>
+ <figure id="application_creation_04">
+ <title>Creating a domain name</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Creating_an_OpenShift_Express_Application/application_creation_04.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Going through the process of creating a domain name.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <note>
+ <para>
+ If you ever wish to rename your domain, you can do so by changing the name as it appears in the <guilabel>Domain name</guilabel> field and then click <guibutton>Rename</guibutton>.
+ </para>
+ </note>
+ <para>
+ Click the <guibutton>New</guibutton> in the <guilabel>Available Applications</guilabel> section of the wizard to begin creating your first OpenShift application for the specified domain.
+ </para>
+ <figure id="application_creation_05">
+ <title>Creating a new OpenShift Express application</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Creating_an_OpenShift_Express_Application/application_creation_05.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Specifying the name and cartridge for the new OpenShift Express application.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ You will need to specify a name for the application and the platform to deploy for, from the <guilabel>Cartdige</guilabel> drop-down list. Click <guibutton>Finish</guibutton> to create the application.
+ </para>
+ <note>
+ <para>
+ No underscores or special characters are allowed in the application name.
+ </para>
+ </note>
+ <figure id="application_creation_06">
+ <title>Created application availability</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Creating_an_OpenShift_Express_Application/application_creation_06.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ The created application is now available in the Available Applications section.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ You can select an available application by clicking on it in the <guilabel>Available Applications</guilabel> section of the window. Having selected an application, you can now <guibutton>Delete</guibutton> or view the details of the application by clicking the <guibutton>Details</guibutton>; try that now.
+ </para>
+ <figure id="application_creation_07">
+ <title>Application details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Creating_an_OpenShift_Express_Application/application_creation_07.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ The details screen for the application.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ The <guilabel>Application Details</guilabel> will provide you with all the information available concenring the application. To close this window and return to the previous window, click <guibutton>OK</guibutton>.
+ </para>
+ <figure id="application_creation_06b">
+ <title>Application availability</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Creating_an_OpenShift_Express_Application/application_creation_06.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Having returned to the previous screen, we can see that the application is still available.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Click the <guibutton>Next</guibutton> to proceed to the next screen.
+ </para>
+ <figure id="application_creation_08">
+ <title>Importing the project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Creating_an_OpenShift_Express_Application/application_creation_08.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Cloning the project from the Git repository and creating the JBoss Server adapter.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ The final screen of the <guilabel>OpenShift application wizard</guilabel> specifies <guilabel>Git clone</guilabel> settings and <guilabel>JBoss Server adapter</guilabel> options.
+ </para>
+ <para>
+ In the <guilabel>Git clone</guilabel> section of the window sets the properties for creating a local copy of your application for you to work with. The location of your application in the Git repository of your domain is present in the <guilabel>Cloning From</guilabel> field. The <guilabel>Destination</guilabel> and <guilabel>Remote name</guilabel> options will be set to default automatically, however you are able to change these by deselecting the <property>default</property> option and specifying custom settings in the fields provided.
+ </para>
+ <para>
+ The <guilabel>JBoss Server adapter</guilabel> section of the window will have the option to <property>Create a JBoss server adapter</property> selected automatically. Creating a JBoss server adapter will allow you to publish changes you make to your application, back to your OpenShift Express domain.
+ </para>
+ <para>
+ Click the <guibutton>Finish</guibutton> to begin the cloning of the Git repository.
+ </para>
+ <!--Figure-->
+</chapter>
+
Added: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_01.png
===================================================================
(Binary files differ)
Property changes on: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_01.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_02.png
===================================================================
(Binary files differ)
Property changes on: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_02.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_03.png
===================================================================
(Binary files differ)
Property changes on: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_03.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_04.png
===================================================================
(Binary files differ)
Property changes on: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_04.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_05.png
===================================================================
(Binary files differ)
Property changes on: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_05.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_06.png
===================================================================
(Binary files differ)
Property changes on: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_06.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_07.png
===================================================================
(Binary files differ)
Property changes on: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_07.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_08.png
===================================================================
(Binary files differ)
Property changes on: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_08.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
13 years, 1 month
JBoss Tools SVN: r36854 - in trunk/jst/plugins/org.jboss.tools.jst.css: src/org/jboss/tools/jst/css/dialog and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-12-01 18:49:44 -0500 (Thu, 01 Dec 2011)
New Revision: 36854
Modified:
trunk/jst/plugins/org.jboss.tools.jst.css/resources/cssdialog/color_properties.xml
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/StyleComposite.java
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/common/CSSConstants.java
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/common/Util.java
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/tabs/BaseTabControl.java
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/widgets/ImageCombo.java
Log:
JBIDE-10228
https://issues.jboss.org/browse/JBIDE-10228
ImageRegistry is used to manage images. Small failures of CSS dialog are fixed.
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/resources/cssdialog/color_properties.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/resources/cssdialog/color_properties.xml 2011-12-01 22:44:46 UTC (rev 36853)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/resources/cssdialog/color_properties.xml 2011-12-01 23:49:44 UTC (rev 36854)
@@ -4,9 +4,9 @@
<comment>Example</comment>
<entry key="#F0F8FF">AliceBlue</entry>
<entry key="#FAEBD7">AntiqueWhite</entry>
- <entry key="#00FFFF">Aqua" </entry>
- <entry key="#7FFFD4">Aquamarine" </entry>
- <entry key="#F0FFFF">Azure" </entry>
+ <entry key="#00FFFF">Aqua</entry>
+ <entry key="#7FFFD4">Aquamarine</entry>
+ <entry key="#F0FFFF">Azure</entry>
<entry key="#F5F5DC">Beige</entry>
<entry key="#FFE4C4">Bisque</entry>
<entry key="#000000">Black</entry>
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/StyleComposite.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/StyleComposite.java 2011-12-01 22:44:46 UTC (rev 36853)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/StyleComposite.java 2011-12-01 23:49:44 UTC (rev 36854)
@@ -13,8 +13,11 @@
import java.util.Map;
import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
@@ -22,6 +25,8 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
+import org.jboss.tools.jst.css.CSSPlugin;
+import org.jboss.tools.jst.css.dialog.common.CSSConstants;
import org.jboss.tools.jst.css.dialog.common.StyleAttributes;
import org.jboss.tools.jst.css.dialog.tabs.BaseTabControl;
import org.jboss.tools.jst.css.dialog.tabs.ICSSTabControl;
@@ -145,6 +150,15 @@
tabFolder.setSelection(DEFAULT_START_TAB);
+ addDisposeListener(new DisposeListener() {
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ ImageRegistry registry = CSSPlugin.getDefault().getImageRegistry();
+ for (String color : CSSConstants.COLORS_BY_RGB.values()) {
+ registry.remove(color);
+ }
+ }
+ });
}
/**
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/common/CSSConstants.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/common/CSSConstants.java 2011-12-01 22:44:46 UTC (rev 36853)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/common/CSSConstants.java 2011-12-01 23:49:44 UTC (rev 36854)
@@ -16,6 +16,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
+import java.util.TreeMap;
import org.jboss.tools.jst.css.CSSPlugin;
import org.jboss.tools.jst.css.dialog.parsers.BaseListener;
@@ -49,7 +50,8 @@
public static final Map<String, ArrayList<String>> CSS_STYLES_MAP = new HashMap<String, ArrayList<String>>();
- public static Map<String, String> COLORS;
+ public static Map<String, String> COLORS_BY_RGB;
+ public static Map<String, String> COLORS_BY_NAME;
private static final String CSS_VALUES_FILE = "resources/cssdialog/cssElementsWithCombo.xml"; //$NON-NLS-1$
private static final String CSS_STYLES_FILE = "resources/cssdialog/cssElements.xml"; //$NON-NLS-1$
@@ -72,7 +74,13 @@
properties.loadFromXML(is);
is.close();
- COLORS = (Map) properties;
+ COLORS_BY_RGB = (Map) properties;
+ COLORS_BY_NAME = new TreeMap<String, String>();
+ for (String rgb: COLORS_BY_RGB.keySet()) {
+ String name = COLORS_BY_RGB.get(rgb);
+ COLORS_BY_NAME.put(name.toLowerCase(), rgb);
+ }
+
} catch (IOException e) {
// TODO Auto-generated catch block
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/common/Util.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/common/Util.java 2011-12-01 22:44:46 UTC (rev 36853)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/common/Util.java 2011-12-01 23:49:44 UTC (rev 36854)
@@ -149,35 +149,11 @@
}
return convertColorHEX(color);
} else if (color.toLowerCase().indexOf(RGB) != Constants.DONT_CONTAIN) {
-
- int start = color.indexOf(OPEN_BRACKET);
- int end = color.indexOf(CLOSE_BRACKET);
- String str = color.substring(start + 1, end);
-
- StringTokenizer st = new StringTokenizer(str, Constants.COMMA);
-
- int j = 0;
- while (st.hasMoreTokens()) {
- try {
- int i = Integer.parseInt(st.nextToken().trim());
- if (i < MIN_VALUE_RGB || i > MAX_VALUE_RGB) {
- return null;
- }
- } catch (NumberFormatException e) {
- return null;
- }
- j++;
- }
- if (j == COUNT_COLORS) {
- return convertColorRGB(color);
- }
+ return convertColorRGB(color);
} else {
- Map<String, String> colorMap = CSSConstants.COLORS;
-
- for (String key : colorMap.keySet()) {
- if (colorMap.get(key).equalsIgnoreCase(color)) {
- return convertColorHEX(key);
- }
+ String rgb = CSSConstants.COLORS_BY_NAME.get(color.toLowerCase());
+ if(rgb != null) {
+ return convertColorHEX(rgb);
}
}
@@ -242,15 +218,34 @@
int rgb[] = new int[COUNT_COLORS];
- int start = newStr.indexOf(OPEN_BRACKET);
- int end = newStr.indexOf(CLOSE_BRACKET);
+ int start = -1;
+ int end = -1;
+ if((start = newStr.indexOf('(')) >= 0) {
+ end = newStr.indexOf(')');
+ } else if((start = newStr.indexOf('{')) >= 0) {
+ end = newStr.indexOf('}');
+ }
+ if(start < 0 || end < start) {
+ return null;
+ }
String str = newStr.substring(start + 1, end);
StringTokenizer st = new StringTokenizer(str, Constants.COMMA);
int i = 0;
while (st.hasMoreTokens()) {
- rgb[i++] = Integer.parseInt(st.nextToken().trim());
+ if(i == 3) {
+ return null;
+ }
+ try {
+ rgb[i++] = Integer.parseInt(st.nextToken().trim());
+ } catch (NumberFormatException e) {
+ //It is user input error, should not be reported to log.
+ return null;
+ }
}
+ if(i != 3) {
+ return null;
+ }
return new RGB(rgb[0], rgb[1], rgb[2]);
}
@@ -294,8 +289,8 @@
: Constants.EMPTY)
+ Integer.toHexString(rgb.blue);
colorStr = colorStr.toUpperCase();
- if (CSSConstants.COLORS.get(colorStr) != null) {
- return CSSConstants.COLORS.get(colorStr);
+ if (CSSConstants.COLORS_BY_RGB.containsKey(colorStr)) {
+ return CSSConstants.COLORS_BY_RGB.get(colorStr);
}
return colorStr;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/tabs/BaseTabControl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/tabs/BaseTabControl.java 2011-12-01 22:44:46 UTC (rev 36853)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/tabs/BaseTabControl.java 2011-12-01 23:49:44 UTC (rev 36854)
@@ -197,9 +197,13 @@
colorCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER,
true, false));
- for (Map.Entry<String, String> me : CSSConstants.COLORS.entrySet()) {
- RGB rgb = Util.getColor(me.getKey());
- colorCombo.add(me.getValue(), rgb);
+ for (Map.Entry<String, String> me : CSSConstants.COLORS_BY_NAME.entrySet()) {
+ RGB rgb = Util.getColor(me.getValue());
+ String name = CSSConstants.COLORS_BY_RGB.get(me.getValue());
+ if(name == null) {
+ name = me.getKey();
+ }
+ colorCombo.add(name, rgb);
}
Button button = createButton(wrapper,
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/widgets/ImageCombo.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/widgets/ImageCombo.java 2011-12-01 22:44:46 UTC (rev 36853)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/widgets/ImageCombo.java 2011-12-01 23:49:44 UTC (rev 36854)
@@ -322,7 +322,6 @@
}
private Image newImageByColor(String string, RGB rgb) {
- System.out.println("-->" + string);
Color white = new Color(getDisplay(), Constants.RGB_WHITE);
Color black = new Color(getDisplay(), Constants.RGB_BLACK);
Color color = new Color(getDisplay(), rgb);
13 years, 1 month
JBoss Tools SVN: r36853 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/META-INF.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-12-01 17:44:46 -0500 (Thu, 01 Dec 2011)
New Revision: 36853
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF
Log:
Changed org.eclipse.datatools.connectivity;bundle-version="1.2.3" to "1.2.0"
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF 2011-12-01 22:34:34 UTC (rev 36852)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF 2011-12-01 22:44:46 UTC (rev 36853)
@@ -14,7 +14,7 @@
org.eclipse.debug.core;bundle-version="3.7.0",
org.eclipse.core.variables;bundle-version="3.2.500",
org.eclipse.jdt.core;bundle-version="3.7.0",
- org.eclipse.datatools.connectivity;bundle-version="1.2.3"
+ org.eclipse.datatools.connectivity;bundle-version="1.2.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.eclipse.debug.core
13 years, 1 month
JBoss Tools SVN: r36852 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-12-01 17:34:34 -0500 (Thu, 01 Dec 2011)
New Revision: 36852
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java
Log:
JBIDE-10217 JBoss Central Search location & defaults
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java 2011-12-01 22:28:34 UTC (rev 36851)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java 2011-12-01 22:34:34 UTC (rev 36852)
@@ -17,6 +17,8 @@
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.action.ControlContribution;
+import org.eclipse.jface.action.GroupMarker;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
import org.eclipse.swt.SWT;
@@ -28,6 +30,7 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.ui.IEditorInput;
@@ -46,10 +49,12 @@
/**
*
* @author snjeza
- *
+ *
*/
public class JBossCentralEditor extends SharedHeaderFormEditor {
+ private static final String COMMANDS_GROUP = "commands";
+
private static final String UTF_8_ENCODING = "UTF-8";
private static final String JBOSS_CENTRAL = "JBoss Central";
@@ -57,17 +62,17 @@
public static final String ID = "org.jboss.tools.central.editors.JBossCentralEditor";
private AbstractJBossCentralPage gettingStartedPage;
-
+
private SoftwarePage softwarePage;
-
+
private Image headerImage;
private Image gettingStartedImage;
private Image softwareImage;
-
+
public JBossCentralEditor() {
super();
}
-
+
public void dispose() {
if (headerImage != null) {
headerImage.dispose();
@@ -84,28 +89,30 @@
RefreshBlogsJob.INSTANCE.cancel();
super.dispose();
}
-
+
public void doSave(IProgressMonitor monitor) {
-
+
}
-
+
public void doSaveAs() {
-
+
}
-
+
/**
* The <code>MultiPageEditorExample</code> implementation of this method
* checks that the input is an instance of <code>IFileEditorInput</code>.
*/
public void init(IEditorSite site, IEditorInput editorInput)
- throws PartInitException {
+ throws PartInitException {
if (!(editorInput instanceof JBossCentralEditorInput))
- throw new PartInitException("Invalid Input: Must be JBossCentralEditorInput");
+ throw new PartInitException(
+ "Invalid Input: Must be JBossCentralEditorInput");
super.init(site, editorInput);
setPartName(JBOSS_CENTRAL);
}
- /* (non-Javadoc)
- * Method declared on IEditorPart.
+
+ /*
+ * (non-Javadoc) Method declared on IEditorPart.
*/
public boolean isSaveAsAllowed() {
return false;
@@ -117,10 +124,11 @@
gettingStartedPage = new GettingStartedPage(this);
int index = addPage(gettingStartedPage);
if (gettingStartedImage == null) {
- gettingStartedImage = JBossCentralActivator.getImageDescriptor("/icons/gettingStarted.png").createImage();
+ gettingStartedImage = JBossCentralActivator.getImageDescriptor(
+ "/icons/gettingStarted.png").createImage();
}
setPageImage(index, gettingStartedImage);
-
+
if (JBossCentralActivator.getDefault().getConfigurator()
.getJBossDiscoveryDirectory() != null) {
softwarePage = new SoftwarePage(this);
@@ -146,29 +154,70 @@
ScrolledForm form = headerForm.getForm();
form.setText(JBOSS_CENTRAL);
form.setToolTipText(JBOSS_CENTRAL);
-
+
form.setImage(getHeaderImage());
getToolkit().decorateFormHeading(form.getForm());
-
- Composite headerComposite = getToolkit().createComposite(form.getForm().getHead(), SWT.NONE);
- headerComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- headerComposite.setLayout(new GridLayout(2, false));
- headerComposite.setBackground(null);
- Composite searchComposite = getToolkit().createComposite(headerComposite);
+ // Composite headerComposite =
+ // getToolkit().createComposite(form.getForm().getHead(), SWT.NONE);
+ // headerComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
+ // false));
+ // headerComposite.setLayout(new GridLayout(2, false));
+ // headerComposite.setBackground(null);
+ //
+ // createSearchControl(headerComposite);
+
+ // form.getForm().setHeadClient(headerComposite);
+
+ IToolBarManager toolbar = form.getToolBarManager();
+ ControlContribution searchControl = new ControlContribution("Search") {
+ @Override
+ protected Control createControl(Composite parent) {
+ return createSearchControl(parent);
+ }
+ };
+ toolbar.add(searchControl);
+ toolbar.add(new GroupMarker(COMMANDS_GROUP));
+ String[] commandIds = JBossCentralActivator.getDefault()
+ .getConfigurator().getMainToolbarCommandIds();
+ for (String commandId : commandIds) {
+ CommandContributionItem item = JBossCentralActivator
+ .createContributionItem(getSite(), commandId);
+ toolbar.appendToGroup(COMMANDS_GROUP, item);
+ }
+
+ toolbar.update(true);
+ form.layout(true, true);
+ }
+
+ protected Control createSearchControl(Composite parent) {
+
+ Composite searchComposite = getToolkit().createComposite(parent);
GridData gd = new GridData(SWT.BEGINNING, SWT.FILL, true, true);
gd.widthHint = 200;
searchComposite.setLayoutData(gd);
searchComposite.setBackground(null);
- searchComposite.setLayout(new GridLayout(2, false));
- ImageHyperlink menuLink = getToolkit().createImageHyperlink(searchComposite, SWT.NONE);
- gd = new GridData(SWT.FILL, SWT.CENTER, false, false);
+
+ GridLayout gridLayout = new GridLayout(2, false);
+ gridLayout.marginBottom = 0;
+ gridLayout.marginTop = 0;
+ gridLayout.marginHeight = 0;
+ gridLayout.marginWidth = 0;
+ gridLayout.verticalSpacing = 0;
+ gridLayout.marginLeft = 0;
+ gridLayout.marginRight = 0;
+ searchComposite.setLayout(gridLayout);
+ ImageHyperlink menuLink = getToolkit().createImageHyperlink(
+ searchComposite, SWT.NONE);
+ gd = new GridData(SWT.FILL, SWT.TOP, false, false);
menuLink.setLayoutData(gd);
menuLink.setBackground(null);
- menuLink.setImage(CommonImages.getImage(CommonImages.TOOLBAR_ARROW_DOWN));
+ menuLink.setImage(CommonImages
+ .getImage(CommonImages.TOOLBAR_ARROW_DOWN));
menuLink.setToolTipText("Search Menu");
- final TextSearchControl searchControl = new TextSearchControl(searchComposite, false);
- gd = new GridData(SWT.END, SWT.FILL, true, true);
+ final TextSearchControl searchControl = new TextSearchControl(
+ searchComposite, false);
+ gd = new GridData(SWT.END, SWT.TOP, true, true);
gd.widthHint = 200;
searchControl.setLayoutData(gd);
searchControl.setBackground(null);
@@ -179,19 +228,25 @@
public void widgetDefaultSelected(SelectionEvent e) {
if (e.detail == SWT.CANCEL) {
searchControl.getTextControl().setText("");
- searchControl.setInitialMessage(searchControl.getInitialMessage());
+ searchControl.setInitialMessage(searchControl
+ .getInitialMessage());
} else {
try {
StringBuffer url = new StringBuffer();
- String initialMessage = searchControl.getInitialMessage();
- if (JBossCentralActivator.SEARCH_RED_HAT_CUSTOMER_PORTAL.equals(initialMessage)) {
+ String initialMessage = searchControl
+ .getInitialMessage();
+ if (JBossCentralActivator.SEARCH_RED_HAT_CUSTOMER_PORTAL
+ .equals(initialMessage)) {
url.append("https://access.redhat.com/knowledge/searchResults?col=avalon_portal&topSe...");
- url.append(URLEncoder.encode(searchControl.getText(), UTF_8_ENCODING));
+ url.append(URLEncoder.encode(
+ searchControl.getText(), UTF_8_ENCODING));
} else {
url.append("http://community.jboss.org/search.jspa?searchArea=");
- url.append(URLEncoder.encode(initialMessage, UTF_8_ENCODING));
+ url.append(URLEncoder.encode(initialMessage,
+ UTF_8_ENCODING));
url.append("&as_sitesearch=jboss.org&q=");
- url.append(URLEncoder.encode(searchControl.getText(), UTF_8_ENCODING));
+ url.append(URLEncoder.encode(
+ searchControl.getText(), UTF_8_ENCODING));
}
final String location = url.toString();
AbstractHandler handler = new OpenJBossBlogsHandler() {
@@ -200,7 +255,7 @@
public String getLocation() {
return location;
}
-
+
};
handler.execute(new ExecutionEvent());
} catch (UnsupportedEncodingException e1) {
@@ -210,80 +265,70 @@
}
}
}
-
+
});
-
+
final Menu menu = new Menu(menuLink);
final MenuItem searchCommunityPortal = new MenuItem(menu, SWT.CHECK);
- searchCommunityPortal.setText(JBossCentralActivator.SEARCH_RED_HAT_CUSTOMER_PORTAL);
+ searchCommunityPortal
+ .setText(JBossCentralActivator.SEARCH_RED_HAT_CUSTOMER_PORTAL);
final MenuItem searchCommunity = new MenuItem(menu, SWT.CHECK);
searchCommunity.setText(JBossCentralActivator.SEARCH_THE_COMMUNITY);
-
+
String initialMessage = searchControl.getInitialMessage();
- if (JBossCentralActivator.SEARCH_RED_HAT_CUSTOMER_PORTAL.equals(initialMessage)) {
+ if (JBossCentralActivator.SEARCH_RED_HAT_CUSTOMER_PORTAL
+ .equals(initialMessage)) {
searchCommunityPortal.setSelection(true);
} else {
searchCommunity.setSelection(true);
}
searchCommunity.addSelectionListener(new SelectionAdapter() {
-
+
@Override
public void widgetSelected(SelectionEvent e) {
searchCommunity.setSelection(true);
searchCommunityPortal.setSelection(false);
- searchControl.setInitialMessage(JBossCentralActivator.SEARCH_THE_COMMUNITY);
+ searchControl
+ .setInitialMessage(JBossCentralActivator.SEARCH_THE_COMMUNITY);
}
-
+
});
-
+
searchCommunityPortal.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
searchCommunity.setSelection(false);
searchCommunityPortal.setSelection(true);
- searchControl.setInitialMessage(JBossCentralActivator.SEARCH_RED_HAT_CUSTOMER_PORTAL);
+ searchControl
+ .setInitialMessage(JBossCentralActivator.SEARCH_RED_HAT_CUSTOMER_PORTAL);
}
-
+
});
menuLink.addMouseListener(new MouseListener() {
-
+
@Override
public void mouseUp(MouseEvent e) {
menu.setVisible(false);
}
-
+
@Override
public void mouseDown(MouseEvent e) {
menu.setVisible(true);
}
-
+
@Override
public void mouseDoubleClick(MouseEvent e) {
-
+
}
});
-
- form.getForm().setHeadClient(headerComposite);
- //form.getForm().setToolBarVerticalAlignment(SWT.BOTTOM);
-
- IToolBarManager toolbar = form.getToolBarManager();
- String[] commandIds = JBossCentralActivator.getDefault().getConfigurator().getMainToolbarCommandIds();
- for (String commandId:commandIds) {
- CommandContributionItem item = JBossCentralActivator.createContributionItem(getSite(), commandId);
- toolbar.add(item);
- }
-
-
- //item = JBossCentralActivator.createContributionItem(getSite(), "org.jboss.tools.central.openJBossToolsTwitter");
- //toolbar.add(item);
-
- toolbar.update(true);
+ return searchComposite;
}
private Image getHeaderImage() {
- return JBossCentralActivator.getDefault().getConfigurator().getHeaderImage();
+ return JBossCentralActivator.getDefault().getConfigurator()
+ .getHeaderImage();
}
public AbstractJBossCentralPage getGettingStartedPage() {
@@ -293,6 +338,5 @@
public SoftwarePage getSoftwarePage() {
return softwarePage;
}
-
-
+
}
13 years, 1 month
JBoss Tools SVN: r36850 - in trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css: dialog and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-12-01 17:02:50 -0500 (Thu, 01 Dec 2011)
New Revision: 36850
Modified:
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CSSPlugin.java
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/AbstractCSSDialog.java
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/widgets/ImageCombo.java
Log:
JBIDE-10228
https://issues.jboss.org/browse/JBIDE-10228
ImageRegistry is used to manage images.
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CSSPlugin.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CSSPlugin.java 2011-12-01 20:21:57 UTC (rev 36849)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CSSPlugin.java 2011-12-01 22:02:50 UTC (rev 36850)
@@ -32,6 +32,7 @@
* The constructor
*/
public CSSPlugin() {
+ plugin = this;
}
/*
@@ -43,7 +44,6 @@
*/
public void start(BundleContext context) throws Exception {
super.start(context);
- plugin = this;
}
/*
@@ -54,7 +54,6 @@
* )
*/
public void stop(BundleContext context) throws Exception {
- plugin = null;
super.stop(context);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/AbstractCSSDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/AbstractCSSDialog.java 2011-12-01 20:21:57 UTC (rev 36849)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/AbstractCSSDialog.java 2011-12-01 22:02:50 UTC (rev 36850)
@@ -83,8 +83,7 @@
/*
* Set the dialog image
*/
- setTitleImage(ModelUIImages.getImageDescriptor(
- ModelUIImages.WIZARD_DEFAULT).createImage());
+ setTitleImage(ModelUIImages.getImage(ModelUIImages.WIZARD_DEFAULT));
Composite parentComposite = (Composite) super.createDialogArea(parent);
GridData gridData = (GridData) parentComposite.getLayoutData();
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/widgets/ImageCombo.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/widgets/ImageCombo.java 2011-12-01 20:21:57 UTC (rev 36849)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/widgets/ImageCombo.java 2011-12-01 22:02:50 UTC (rev 36850)
@@ -12,10 +12,9 @@
import java.util.Arrays;
+import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTException;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
@@ -39,6 +38,7 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.TypedListener;
import org.eclipse.swt.widgets.Widget;
+import org.jboss.tools.jst.css.CSSPlugin;
import org.jboss.tools.jst.jsp.messages.JstUIMessages;
import org.jboss.tools.jst.jsp.util.Constants;
@@ -232,17 +232,10 @@
TableItem newItem = new TableItem(this.table, SWT.NONE);
newItem.setText(string);
-
- if (image != null) {
- newItem.setImage(image);
+
+ if(image != null) {
+ newItem.setImage(image);
}
-
- newItem.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- TableItem item = (TableItem) e.getSource();
- item.getImage().dispose();
- }
- });
}
/**
@@ -289,12 +282,6 @@
if (image != null) {
newItem.setImage(image);
- newItem.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- TableItem item = (TableItem) e.getSource();
- item.getImage().dispose();
- }
- });
}
}
@@ -321,6 +308,21 @@
* @see #add(String,int)
*/
public void add(String string, RGB rgb) {
+ add(string, getImageByColor(string, rgb));
+ }
+
+ Image getImageByColor(String string, RGB rgb) {
+ ImageRegistry registry = CSSPlugin.getDefault().getImageRegistry();
+ Image result = registry.get(string);
+ if(result == null) {
+ result = newImageByColor(string, rgb);
+ registry.put(string, result);
+ }
+ return result;
+ }
+
+ private Image newImageByColor(String string, RGB rgb) {
+ System.out.println("-->" + string);
Color white = new Color(getDisplay(), Constants.RGB_WHITE);
Color black = new Color(getDisplay(), Constants.RGB_BLACK);
Color color = new Color(getDisplay(), rgb);
@@ -353,7 +355,7 @@
color.dispose();
black.dispose();
white.dispose();
- add(string, icon);
+ return icon;
}
/**
13 years, 1 month
JBoss Tools SVN: r36849 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-12-01 15:21:57 -0500 (Thu, 01 Dec 2011)
New Revision: 36849
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/ActiveEditorSwitcher.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeUpdateJob.java
Removed:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/ActiveEditorSwitcher.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeUpdateJob.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
reverted patch with full document rebuild optimization, because it has problem with loosing events
applied previous patch which seems to have right behavior without optimization
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/ActiveEditorSwitcher.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/ActiveEditorSwitcher.java 2011-12-01 20:16:05 UTC (rev 36848)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/ActiveEditorSwitcher.java 2011-12-01 20:21:57 UTC (rev 36849)
@@ -1,40 +0,0 @@
-package org.jboss.tools.vpe.editor;
-
-public class ActiveEditorSwitcher {
- public static final int ACTIVE_EDITOR_CANNOT = 0;
- public static final int ACTIVE_EDITOR_NONE = 1;
- public static final int ACTIVE_EDITOR_SOURCE = 2;
- public static final int ACTIVE_EDITOR_VISUAL = 3;
-
- private int type = ACTIVE_EDITOR_CANNOT;
- private VpeController vpeController;
- private VpeEditorPart editPart;
-
- public ActiveEditorSwitcher(VpeController vpeController, VpeEditorPart editPart) {
- this.vpeController = vpeController;
- this.editPart = editPart;
- }
-
- public void initActiveEditor() {
- type = ACTIVE_EDITOR_NONE;
- }
-
- public void destroyActiveEditor() {
- type = ACTIVE_EDITOR_CANNOT;
- }
-
- public boolean startActiveEditor(int newType) {
- if (type != ACTIVE_EDITOR_NONE || type == ACTIVE_EDITOR_NONE && newType == ACTIVE_EDITOR_SOURCE
- && editPart.getVisualMode() == VpeEditorPart.SOURCE_MODE) {
- return false;
- } else {
- type = newType;
- return true;
- }
- }
-
- public void stopActiveEditor() {
- vpeController.onRefresh();
- type = ACTIVE_EDITOR_NONE;
- }
-}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/ActiveEditorSwitcher.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/ActiveEditorSwitcher.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/ActiveEditorSwitcher.java 2011-12-01 20:21:57 UTC (rev 36849)
@@ -0,0 +1,40 @@
+package org.jboss.tools.vpe.editor;
+
+public class ActiveEditorSwitcher {
+ public static final int ACTIVE_EDITOR_CANNOT = 0;
+ public static final int ACTIVE_EDITOR_NONE = 1;
+ public static final int ACTIVE_EDITOR_SOURCE = 2;
+ public static final int ACTIVE_EDITOR_VISUAL = 3;
+
+ private int type = ACTIVE_EDITOR_CANNOT;
+ private VpeController vpeController;
+ private VpeEditorPart editPart;
+
+ public ActiveEditorSwitcher(VpeController vpeController, VpeEditorPart editPart) {
+ this.vpeController = vpeController;
+ this.editPart = editPart;
+ }
+
+ public void initActiveEditor() {
+ type = ACTIVE_EDITOR_NONE;
+ }
+
+ public void destroyActiveEditor() {
+ type = ACTIVE_EDITOR_CANNOT;
+ }
+
+ public boolean startActiveEditor(int newType) {
+ if (type != ACTIVE_EDITOR_NONE || type == ACTIVE_EDITOR_NONE && newType == ACTIVE_EDITOR_SOURCE
+ && editPart.getVisualMode() == VpeEditorPart.SOURCE_MODE) {
+ return false;
+ } else {
+ type = newType;
+ return true;
+ }
+ }
+
+ public void stopActiveEditor() {
+ vpeController.onRefresh();
+ type = ACTIVE_EDITOR_NONE;
+ }
+}
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/ActiveEditorSwitcher.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2011-12-01 20:16:05 UTC (rev 36848)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2011-12-01 20:21:57 UTC (rev 36849)
@@ -164,7 +164,6 @@
MozillaContextMenuListener, MozillaResizeListener,
MozillaAfterPaintListener, MozillaScrollListener {
- public static final int DEFAULT_UPDATE_DELAY_TIME = 400;
private boolean visualEditorVisible = true;
private boolean synced = true;
StructuredTextEditor sourceEditor;
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeUpdateJob.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeUpdateJob.java 2011-12-01 20:16:05 UTC (rev 36848)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeUpdateJob.java 2011-12-01 20:21:57 UTC (rev 36849)
@@ -1,113 +0,0 @@
-package org.jboss.tools.vpe.editor;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.ui.progress.UIJob;
-import org.jboss.tools.vpe.VpePlugin;
-import org.jboss.tools.vpe.editor.toolbar.format.FormatControllerManager;
-import org.jboss.tools.vpe.messages.VpeUIMessages;
-
-public class VpeUpdateJob extends UIJob {
-
- protected boolean execState = false;
-
- protected VpeController vpeController;
- protected ActiveEditorSwitcher switcher;
-
- public VpeUpdateJob(VpeController vpeController, ActiveEditorSwitcher switcher) {
- super(VpeUIMessages.VPE_UPDATE_JOB_TITLE);
- this.vpeController = vpeController;
- this.switcher = switcher;
- }
-
- protected synchronized void setExecState(boolean execState) {
- this.execState = execState;
- }
-
- protected synchronized boolean isExecState() {
- return execState;
- }
-
- public void interrupt() {
- setExecState(false);
- }
-
- public void execute() {
- setExecState(true);
- schedule();
- }
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- IStatus res = Status.OK_STATUS;
- final int totalWork = 10000;
- final int maxQueue4WholeRefresh = 30;
- monitor.beginTask(VpeUIMessages.VPE_UPDATE_JOB_TITLE, totalWork);
- final List<VpeEventBean> changeEvents = vpeController.getChangeEvents();
- while (changeEvents.size() > 0) {
- if (!isExecState()) {
- break;
- }
- if (changeEvents.size() > maxQueue4WholeRefresh) {
- changeEvents.clear();
- monitor.worked((int) (totalWork / 2));
- vpeController.reinitImpl();
- monitor.worked(totalWork);
- break;
- }
- monitor.worked((int) (totalWork / changeEvents.size()));
- VpeEventBean eventBean = changeEvents.remove(0);
- if (monitor.isCanceled()) {
- // Yahor Radtsevich: the following line is commented as fix of JBIDE-3758: VPE autorefresh is broken in
- // some cases. Now if the change events queue should be cleared, the user have to do it explicitly.
- // getChangeEvents().clear();
- res = Status.CANCEL_STATUS;
- break;
- }
- try {
- vpeController.notifyChangedInUiThread(eventBean);
- } catch (VpeDisposeException ex) {
- // JBIDE-675 we will get this exception if user
- // close editor,
- // when update visual editor job is running, we
- // shoud ignore this
- // exception
- break;
- } catch (NullPointerException ex) {
- if (switcher != null) {
- throw ex;
- } else {
- // class was disposed and exception result
- // of that we can't stop
- // refresh job in time, so we just ignore
- // this exception
- }
- } catch (RuntimeException ex) {
- VpePlugin.getPluginLog().logError(ex);
- }
- }
- if (isExecState() && res == Status.OK_STATUS) {
- // cause is to lock calls others events
- if (switcher != null && switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
- try {
- vpeController.sourceSelectionChanged();
- // https://jira.jboss.org/jira/browse/JBIDE-3619 VpeViewUpdateJob takes place after toolbar selection
- // have been updated. New nodes haven't been put into dom mapping thus toolbar becomes desabled.
- // Updating toolbar state here takes into account updated vpe nodes.
- final FormatControllerManager tfcm = vpeController.getToolbarFormatControllerManager();
- if (tfcm != null) {
- tfcm.selectionChanged();
- }
- } finally {
- switcher.stopActiveEditor();
- }
- }
- }
- monitor.done();
- return res;
- }
-
-}
\ No newline at end of file
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeUpdateJob.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeUpdateJob.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeUpdateJob.java 2011-12-01 20:21:57 UTC (rev 36849)
@@ -0,0 +1,113 @@
+package org.jboss.tools.vpe.editor;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.progress.UIJob;
+import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.editor.toolbar.format.FormatControllerManager;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+
+public class VpeUpdateJob extends UIJob {
+
+ protected boolean execState = false;
+
+ protected VpeController vpeController;
+ protected ActiveEditorSwitcher switcher;
+
+ public VpeUpdateJob(VpeController vpeController, ActiveEditorSwitcher switcher) {
+ super(VpeUIMessages.VPE_UPDATE_JOB_TITLE);
+ this.vpeController = vpeController;
+ this.switcher = switcher;
+ }
+
+ protected synchronized void setExecState(boolean execState) {
+ this.execState = execState;
+ }
+
+ protected synchronized boolean isExecState() {
+ return execState;
+ }
+
+ public void interrupt() {
+ setExecState(false);
+ }
+
+ public void execute() {
+ setExecState(true);
+ schedule();
+ }
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ IStatus res = Status.OK_STATUS;
+ final int totalWork = 10000;
+ final int maxQueue4WholeRefresh = 30;
+ monitor.beginTask(VpeUIMessages.VPE_UPDATE_JOB_TITLE, totalWork);
+ final List<VpeEventBean> changeEvents = vpeController.getChangeEvents();
+ while (changeEvents.size() > 0) {
+ if (!isExecState()) {
+ break;
+ }
+ if (changeEvents.size() > maxQueue4WholeRefresh) {
+ changeEvents.clear();
+ monitor.worked((int) (totalWork / 2));
+ vpeController.reinitImpl();
+ monitor.worked(totalWork);
+ break;
+ }
+ monitor.worked((int) (totalWork / changeEvents.size()));
+ VpeEventBean eventBean = changeEvents.remove(0);
+ if (monitor.isCanceled()) {
+ // Yahor Radtsevich: the following line is commented as fix of JBIDE-3758: VPE autorefresh is broken in
+ // some cases. Now if the change events queue should be cleared, the user have to do it explicitly.
+ // getChangeEvents().clear();
+ res = Status.CANCEL_STATUS;
+ break;
+ }
+ try {
+ vpeController.notifyChangedInUiThread(eventBean);
+ } catch (VpeDisposeException ex) {
+ // JBIDE-675 we will get this exception if user
+ // close editor,
+ // when update visual editor job is running, we
+ // shoud ignore this
+ // exception
+ break;
+ } catch (NullPointerException ex) {
+ if (switcher != null) {
+ throw ex;
+ } else {
+ // class was disposed and exception result
+ // of that we can't stop
+ // refresh job in time, so we just ignore
+ // this exception
+ }
+ } catch (RuntimeException ex) {
+ VpePlugin.getPluginLog().logError(ex);
+ }
+ }
+ if (isExecState() && res == Status.OK_STATUS) {
+ // cause is to lock calls others events
+ if (switcher != null && switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
+ try {
+ vpeController.sourceSelectionChanged();
+ // https://jira.jboss.org/jira/browse/JBIDE-3619 VpeViewUpdateJob takes place after toolbar selection
+ // have been updated. New nodes haven't been put into dom mapping thus toolbar becomes desabled.
+ // Updating toolbar state here takes into account updated vpe nodes.
+ final FormatControllerManager tfcm = vpeController.getToolbarFormatControllerManager();
+ if (tfcm != null) {
+ tfcm.selectionChanged();
+ }
+ } finally {
+ switcher.stopActiveEditor();
+ }
+ }
+ }
+ monitor.done();
+ return res;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeUpdateJob.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 1 month
JBoss Tools SVN: r36848 - trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2011-12-01 15:16:05 -0500 (Thu, 01 Dec 2011)
New Revision: 36848
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizard.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSAnnotatedClassWizard.java
Log:
JBIDE-10199 - Updates to JAX-RS service generation wizards to do a clean build if the wizard adds the jars to the project
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizard.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizard.java 2011-12-01 20:09:36 UTC (rev 36847)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossRSGenerateWizard.java 2011-12-01 20:16:05 UTC (rev 36848)
@@ -16,6 +16,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
@@ -126,13 +127,18 @@
}
}
try {
- if (getAddJarsFromRootRuntime())
+ boolean addedJars = false;
+ if (getAddJarsFromRootRuntime()) {
new AddRestEasyJarsCommand(model).execute(null, null);
+ addedJars = true;
+ }
RSServiceSampleCreationCommand createCommand =
new RSServiceSampleCreationCommand(model);
createCommand.execute(null, null);
getProject().refreshLocal(IProject.DEPTH_INFINITE, new NullProgressMonitor());
+ if (addedJars)
+ getProject().build(IncrementalProjectBuilder.CLEAN_BUILD, null);
if (createCommand.getResource() != null && createCommand.getResource() instanceof IFile) {
openResource((IFile) createCommand.getResource());
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSAnnotatedClassWizard.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSAnnotatedClassWizard.java 2011-12-01 20:09:36 UTC (rev 36847)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSAnnotatedClassWizard.java 2011-12-01 20:16:05 UTC (rev 36848)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
@@ -139,8 +140,10 @@
addClassesCommand = new ServiceCreationCommand(model);
}
try {
+ boolean addedJars = false;
if (addJarsCommand != null) {
addJarsCommand.execute(null, null);
+ addedJars = true;
}
if (addClassesCommand != null) {
addClassesCommand.execute(null, null);
@@ -154,6 +157,8 @@
openFile1 = (IFile) cmd.getResource();
}
} else if (addClassesCommand instanceof RSServiceCreationCommand) {
+ if (addedJars)
+ getProject().build(IncrementalProjectBuilder.CLEAN_BUILD, null);
RSServiceCreationCommand cmd = (RSServiceCreationCommand) addClassesCommand;
if (cmd.getAnnotatedClassResource() != null && cmd.getAnnotatedClassResource() instanceof IFile) {
openFile1 = (IFile) cmd.getAnnotatedClassResource();
13 years, 1 month