JBoss Tools SVN: r36803 - in trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-30 17:03:52 -0500 (Wed, 30 Nov 2011)
New Revision: 36803
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XIconListImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XModelObjectIcon.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XStudioIcons.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/IconUtil.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelImages.java
Log:
JBIDE-10231
https://issues.jboss.org/browse/JBIDE-10231
ImageRegistry is used to manage images.
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XIconListImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XIconListImpl.java 2011-11-30 21:32:15 UTC (rev 36802)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XIconListImpl.java 2011-11-30 22:03:52 UTC (rev 36803)
@@ -40,7 +40,7 @@
public Image getImage(String name) {
Image image = (Image)eclipseImages.get(name);
- if(image == null) {
+ if(image == null || image.isDisposed()) {
String picture = (String)iconnames.get(name);
if(picture == null) return null;
image = IconUtil.getEclipseImage(picture);
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XModelObjectIcon.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XModelObjectIcon.java 2011-11-30 21:32:15 UTC (rev 36802)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XModelObjectIcon.java 2011-11-30 22:03:52 UTC (rev 36803)
@@ -11,6 +11,8 @@
package org.jboss.tools.common.model.icons.impl;
import java.util.*;
+
+import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
import org.jboss.tools.common.meta.XMapping;
import org.jboss.tools.common.model.*;
@@ -18,7 +20,6 @@
import org.jboss.tools.common.model.util.ModelFeatureFactory;
public class XModelObjectIcon {
- private static Hashtable<String,Image> cacheEclipse = new Hashtable<String,Image>();
static Hashtable<String,ImageComponent> components = null;
private static synchronized void load(XModelObject object) {
@@ -44,8 +45,14 @@
public Image getIcon1(String[] types) {
if(object == null) return null;
String code = "" + getIconHash(types); //$NON-NLS-1$
- Image ii = cacheEclipse.get(code);
- if(ii != null) return ii;
+ ImageRegistry registry = ModelPlugin.getDefault().getImageRegistry();
+ Image ii = null;
+ synchronized (registry) {
+ ii = registry.get(code);
+ }
+ if(ii != null && !ii.isDisposed()) {
+ return ii;
+ }
Vector<Image> v = new Vector<Image>(3);
for (int i = 0; i < types.length; i++) {
ImageComponent component = components.get(types[i]);
@@ -55,13 +62,6 @@
return ic;
}
}
-/*
- TODO add icons
- if(v.size() == 0) v.addElement(IconUtil.getEmptyIcon(new Point(16, 16)));
- ImageIcon[] icons = v.toArray(new ImageIcon[0]);
- ii = IconUtil.getRowImage(icons);
- if(ii != null) cache.put(code, ii);
-*/
return ii;
}
@@ -85,10 +85,21 @@
public Image getEclipseImage0(String[] types) {
if(object == null) return null;
String code = "" + getIconHash(types); //$NON-NLS-1$
- Image iie = cacheEclipse.get(code);
- if(iie != null) return iie;
+ ImageRegistry registry = ModelPlugin.getDefault().getImageRegistry();
+ Image iie = null;
+ synchronized(registry) {
+ iie = registry.get(code);
+ }
+ if(iie != null && !iie.isDisposed()) {
+ return iie;
+ }
Image ii = getIcon1(types);
- if(ii != null) cacheEclipse.put(code, ii);
+ if(ii != null) {
+ synchronized(registry) {
+ ModelPlugin.getDefault().getImageRegistry().remove(code);
+ ModelPlugin.getDefault().getImageRegistry().put(code, ii);
+ }
+ }
return ii;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XStudioIcons.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XStudioIcons.java 2011-11-30 21:32:15 UTC (rev 36802)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XStudioIcons.java 2011-11-30 22:03:52 UTC (rev 36803)
@@ -12,6 +12,7 @@
import java.io.*;
+import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.SWTError;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.graphics.Image;
@@ -82,15 +83,26 @@
String s = obj.getAttributeValue("image"); //$NON-NLS-1$
return (s == null || s.trim().length() == 0) ? "defaultimage".hashCode() : s.hashCode(); //$NON-NLS-1$
}
-
public Image getImage(XModelObject obj) {
String s = obj.getAttributeValue("image"); //$NON-NLS-1$
+ ImageRegistry registry = ModelPlugin.getDefault().getImageRegistry();
+ Image result = null;
+ synchronized(registry) {
+ result = registry.get(s);
+ }
+ if(result != null && !result.isDisposed()) {
+ return result;
+ }
byte[] b = decode(s);
if(b != null) {
try {
ByteArrayInputStream is = new ByteArrayInputStream(b);
ImageData id = new ImageData(is);
Image i = new Image(null, id);
+ synchronized(registry) {
+ registry.remove(s);
+ registry.put(s, i);
+ }
return i;
} catch (SWTException e) {
ModelPlugin.getPluginLog().logError(e);
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/IconUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/IconUtil.java 2011-11-30 21:32:15 UTC (rev 36802)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/IconUtil.java 2011-11-30 22:03:52 UTC (rev 36803)
@@ -10,224 +10,18 @@
******************************************************************************/
package org.jboss.tools.common.model.util;
-import java.awt.image.*;
-
-import javax.swing.*;
-
import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.PaletteData;
-import org.eclipse.swt.graphics.RGB;
public class IconUtil {
public static final int PALETTE_GROUP_IMAGE_TYPE = 1;
public static final int PALETTE_ELEMENT_AS_GROUP_IMAGE_TYPE = 2;
public static final int PALETTE_ELEMENT_IMAGE_TYPE = 3;
public static final int PALETTE_IMAGE_WIDTH = 50;
- private static final int PALETTE_ARROW_TOP = 7;
- private static final int PALETTE_ARROW_RIGHT_SHIFT = 8;
- public IconUtil() {}
+ public IconUtil() {}
-/*
- public static ImageIcon getImage(String imageName) {
- try {
- return new ImageIcon(ModelImages.getImage(imageName));
- } catch (Exception e) {
- ModelPlugin.getDefault().getLog().log(new Status(Status.ERROR, ModelPlugin.PLUGIN_ID, Status.OK, "Image " + imageName + " not found", e));
- }
- return null;
- }
-*/
-
-/*
- private static JPanel dummy = new JPanel();
-
- public static ImageIcon getRowImage(ImageIcon[] icons) {
- Point[] ps = new Point[icons.length];
- int width = 0;
- for (int i = 0; i < icons.length; i++) {
- ps[i] = new Point(width, 0);
- width = width + icons[i].getIconWidth();
- }
- Point size = new Point(width, 16);
- return IconUtil.placeImages(size, icons, ps, false);
- }
-
- public static ImageIcon placeImages(Point size,
- ImageIcon[] icons, Point[] ps,
- boolean transparent) {
- int[] px = new int[size.x * size.y];
- for (int i = 0; i < px.length; i++) px[i] = 0xffffff;
- if(icons.length > 0) {
- addImage(size, px, icons[0], ps[0], false);
- for (int i = 1; i < icons.length; i++)
- addImage(size, px, icons[i], ps[i], transparent);
- }
- ImageProducer ip = new MemoryImageSource(size.x, size.y, px, 0, size.x);
- return new ImageIcon(dummy.createImage(ip));
- }
-
-
- public static ImageIcon placeImages(Point size, ImageIcon i1, Point p1,
- ImageIcon i2, Point p2,
- boolean transparent) {
- if(i1 == null) return (i2 == null) ? getEmptyIcon(size) : i2;
- if(i2 == null) return i1;
- int[] px = new int[size.x * size.y];
- for (int i = 0; i < px.length; i++) px[i] = 0xffffff;
- addImage(size, px, i1, p1, false);
- addImage(size, px, i2, p2, transparent);
- ImageProducer ip = new MemoryImageSource(size.x, size.y, px, 0, size.x);
- return new ImageIcon(dummy.createImage(ip));
- }
-
- private static void addImage(Point size, int[] base, ImageIcon im, Point p,
- boolean transparent) {
- int w = im.getIconWidth(), h = im.getIconHeight();
- int[] img = grabPixels(im);
- int t = img[0];
- for (int i = 0; i < w; i++) for (int j = 0; j < h; j++) {
- int x = p.x + i, y = p.y + j;
- if(x < size.x && y < size.y) {
- int k = img[j*w + i];
- if(k != t || !transparent) base[y*size.x + x] = k;
- }
- }
- }
-
- public static ImageIcon getEmptyIcon(Point size) {
- int[] px = new int[size.x * size.y];
- for (int i = 0; i < px.length; i++) px[i] = 0xffffff;
- ImageProducer ip = new MemoryImageSource(size.x, size.y, px, 0, size.x);
- return new ImageIcon(dummy.createImage(ip));
- }
-*/
- public static int[] grabPixels(ImageIcon im) {
- int w = im.getIconWidth(), h = im.getIconHeight();
- int[] px = new int[h * w];
- PixelGrabber pg = new PixelGrabber(im.getImage(), 0, 0, w, h, px, 0, w);
- try {
- pg.grabPixels();
- } catch (InterruptedException e) {
- //ignore
- }
- return px;
- }
-
- public static ImageData toEclipseImageData(ImageIcon icon) {
- int[] pixels = IconUtil.grabPixels(icon);
- int w = icon.getIconWidth(), h = icon.getIconHeight();
- ImageData imgData = new ImageData(w, h, 32, new PaletteData(0xff0000, 0xff00, 0xff));
- int maskWidth = (((w + 7) / 8) + 1) / 2 * 2;
- byte[] maskDate = new byte[maskWidth * h];
- ImageData mask = new ImageData(w, h, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0), new RGB(255, 255, 255)}), 2, maskDate);
-
- for (int x = 0; x < w; x++) for (int y = 0; y < h; y++) {
- int pixelValue = pixels[y * w + x];
- if ((pixelValue >>> 24) < 0x80) { // trasparant
- imgData.setPixel(x, y, 0);
- mask.setPixel(x, y, 0);
- } else {
- imgData.setPixel(x, y, pixelValue);
- mask.setPixel(x, y, 1);
- }
- }
- imgData.maskPad = mask.scanlinePad;
- imgData.maskData = mask.data;
- return imgData;
- }
-
- public static Image toEclipseImage(ImageIcon icon) {
- return new Image(null, toEclipseImageData(icon));
- }
-
-/*
- public static Image toEclipsePaletteImage(ImageIcon icon, int type) {
- int w = icon.getIconWidth(), h = icon.getIconHeight();
- int left = 0, right = 0;
- if (type == PALETTE_GROUP_IMAGE_TYPE || type == PALETTE_ELEMENT_AS_GROUP_IMAGE_TYPE) {
- if (w < PALETTE_IMAGE_WIDTH) {
- left = (PALETTE_IMAGE_WIDTH - w) / 2;
- right = PALETTE_IMAGE_WIDTH - w - left;
- }
- }
- int width = left + w + right;
- int[] pixels = IconUtil.grabPixels(icon);
- int[] tmp = new int[256];
- int rgbCount = 0;
- int transparentIndex = -1;
- for (int i = 0; i < pixels.length; i++) {
- int pixelIndex = -1;
- int pixelValue = pixels[i];
- if ((pixelValue >>> 24) < 0x80) {
- if (transparentIndex < 0) {
- pixelIndex = rgbCount++;
- tmp[pixelIndex] = pixelValue;
- transparentIndex = pixelIndex;
- } else {
- pixelIndex = transparentIndex;
- }
- } else {
- for (int j = 0; j < rgbCount; j++) {
- if (pixelValue == tmp[j] && j != transparentIndex) {
- pixelIndex = j;
- break;
- }
- }
- if (pixelIndex < 0) {
- pixelIndex = rgbCount++;
- tmp[pixelIndex] = pixelValue;
- }
- }
- pixels[i] = pixelIndex;
- }
-
- RGB[] colors = new RGB[256];
- for (int i = 0; i < 256; i++) {
- if (i < rgbCount) {
- int pixelValue = tmp[i];
- colors[i] = new RGB((pixelValue >> 16) & 0xFF, (pixelValue >> 8) & 0xFF, pixelValue & 0xFF);
- } else {
- colors[i] = new RGB(0, 0, 0);
- }
- }
- PaletteData p = new PaletteData(colors);
- ImageData idata = new ImageData(width, h, 8, p);
- idata.transparentPixel = transparentIndex;
- for (int y = 0; y < h; y++) {
- idata.setPixels(left, y, w, pixels, y * w);
- }
- if (transparentIndex != -1 && (left > 0 || right > 0)) {
- pixels = new int[left > right ? left : right];
- for (int x = 0; x < pixels.length; x++) {
- pixels[x] = transparentIndex;
- }
- if (left > 0) {
- int shift = left + w;
- for (int y = 0; y < h; y++) {
- idata.setPixels(0, y, left, pixels, 0);
- idata.setPixels(shift, y, right, pixels, 0);
- }
- }
- }
-
- if (type == PALETTE_GROUP_IMAGE_TYPE) {
- int shiftX = width - PALETTE_ARROW_RIGHT_SHIFT;
- for (int y = 0; y < 3; y++) {
- for (int x = y; x < 5 - y; x++) {
- idata.setPixel(shiftX + x, PALETTE_ARROW_TOP + y, 200);
- }
- }
- }
-
- return new Image(null, idata);
- }
-*/
-
- public static Image getEclipseImage(String imageName) {
- return ModelImages.getImage(imageName);
- }
-
+ public static Image getEclipseImage(String imageName) {
+ return ModelImages.getImage(imageName);
+ }
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelImages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelImages.java 2011-11-30 21:32:15 UTC (rev 36802)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelImages.java 2011-11-30 22:03:52 UTC (rev 36803)
@@ -15,6 +15,7 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.commands.ICommandImageService;
@@ -31,12 +32,23 @@
}
public static Image getImage(String key) {
- return instance.createImageDescriptor(key).createImage();
+ Image result = null;
+ ImageRegistry registry = ModelPlugin.getDefault().getImageRegistry();
+ synchronized(registry) {
+ result = registry.get(key);
+ }
+ if(result == null || result.isDisposed()) {
+ result = instance.createImageDescriptor(key).createImage();
+ if(result != null) {
+ synchronized (registry) {
+ ModelPlugin.getDefault().getImageRegistry().remove(key);
+ ModelPlugin.getDefault().getImageRegistry().put(key, result);
+ }
+ }
+ }
+ return result;
}
- public static ImageDescriptor getImageDescriptor(String key) {
- return instance.createImageDescriptor(key);
- }
private URL baseUrl;
protected ModelImages(URL url) {
13 years
JBoss Tools SVN: r36802 - trunk/as/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-11-30 16:32:15 -0500 (Wed, 30 Nov 2011)
New Revision: 36802
Modified:
trunk/as/docs/reference/en-US/Book_Info.xml
Log:
updated for brew
Modified: trunk/as/docs/reference/en-US/Book_Info.xml
===================================================================
--- trunk/as/docs/reference/en-US/Book_Info.xml 2011-11-30 21:31:42 UTC (rev 36801)
+++ trunk/as/docs/reference/en-US/Book_Info.xml 2011-11-30 21:32:15 UTC (rev 36802)
@@ -7,7 +7,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>5.0</productnumber>
<edition>5.0.0</edition>
- <pubsnumber>5</pubsnumber>
+ <pubsnumber>6</pubsnumber>
<abstract>
<para>The JBoss Server Manager Reference Guide explains how to use the JBoss Server Manager to configure, start, stop the server, to know deployment and archiving processes.</para>
</abstract>
13 years
JBoss Tools SVN: r36801 - trunk/as/docs/reference/en-US/images/runtimes_servers.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-11-30 16:31:42 -0500 (Wed, 30 Nov 2011)
New Revision: 36801
Modified:
trunk/as/docs/reference/en-US/images/runtimes_servers/runtimes_servers-detecting_new_runtime_5.png
trunk/as/docs/reference/en-US/images/runtimes_servers/runtimes_servers-detecting_new_runtime_6.png
Log:
updated images
Modified: trunk/as/docs/reference/en-US/images/runtimes_servers/runtimes_servers-detecting_new_runtime_5.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en-US/images/runtimes_servers/runtimes_servers-detecting_new_runtime_6.png
===================================================================
(Binary files differ)
13 years
JBoss Tools SVN: r36800 - trunk/seam/plugins/org.jboss.tools.seam.ui.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-11-30 16:09:53 -0500 (Wed, 30 Nov 2011)
New Revision: 36800
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
Log:
https://issues.jboss.org/browse/JBIDE-10149 Remove Seam 2 from the JBoss Perspective actions
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2011-11-30 20:40:26 UTC (rev 36799)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2011-11-30 21:09:53 UTC (rev 36800)
@@ -172,16 +172,6 @@
</perspectiveExtension>
</extension>
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.jboss.tools.common.ui.JBossPerspective">
- <newWizardShortcut
- id="org.jboss.tools.seam.ui.wizards.SeamProjectWizard">
- </newWizardShortcut>
- </perspectiveExtension>
- </extension>
-
<extension point="org.eclipse.ui.navigator.viewer">
<viewerContentBinding viewerId="org.jboss.tools.seam.ui.views.SeamComponentsNavigator">
<includes>
13 years
JBoss Tools SVN: r36799 - trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/marker.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-11-30 15:40:26 -0500 (Wed, 30 Nov 2011)
New Revision: 36799
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/marker/DisableFaceletHTMLValidatorMarkerResolution.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/marker/DisableFaceletHTMLValidatorResolutionGenerator.java
Log:
"Disable Facelet HTML Validator" quick fix https://issues.jboss.org/browse/JBIDE-9366
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/marker/DisableFaceletHTMLValidatorMarkerResolution.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/marker/DisableFaceletHTMLValidatorMarkerResolution.java 2011-11-30 20:20:32 UTC (rev 36798)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/marker/DisableFaceletHTMLValidatorMarkerResolution.java 2011-11-30 20:40:26 UTC (rev 36799)
@@ -37,12 +37,10 @@
IMarkerResolution2 {
private static final String MARKER_TYPE = "org.eclipse.jst.jsf.facelet.ui.FaceletValidationMarker";
private IFile file;
- private boolean forProject;
private String label;
- public DisableFaceletHTMLValidatorMarkerResolution(IFile file, boolean forProject){
+ public DisableFaceletHTMLValidatorMarkerResolution(IFile file){
this.file = file;
- this.forProject = forProject;
label = JsfUIMessages.DISABLE_FACELET_HTML_VALIDATOR_MARKER_RESOLUTION_TITLE;
}
@@ -66,22 +64,12 @@
public void run(IMarker marker) {
MessageDialog dialog = null;
- if(forProject){
- dialog = new MessageDialog(getShell(), label, null,
- NLS.bind(JsfUIMessages.DISABLE_FACELET_HTML_VALIDATOR_MARKER_RESOLUTION_MESSAGE, file.getName())+
- NLS.bind(JsfUIMessages.DISABLE_FACELET_HTML_VALIDATOR_MARKER_RESOLUTION_PROJECT_QUESTION, file.getProject().getName()),
- MessageDialog.QUESTION_WITH_CANCEL,
- new String[]{"Cancel", "Workspace", file.getProject().getName()},
- 0);
- }else{
- dialog = new MessageDialog(getShell(), label, null,
- NLS.bind(JsfUIMessages.DISABLE_FACELET_HTML_VALIDATOR_MARKER_RESOLUTION_MESSAGE, file.getName())+
- JsfUIMessages.DISABLE_FACELET_HTML_VALIDATOR_MARKER_RESOLUTION_WORKSPACE_QUESTION,
- MessageDialog.QUESTION_WITH_CANCEL,
- new String[]{"Cancel", "Ok"},
- 0);
-
- }
+ dialog = new MessageDialog(getShell(), label, null,
+ NLS.bind(JsfUIMessages.DISABLE_FACELET_HTML_VALIDATOR_MARKER_RESOLUTION_MESSAGE, file.getName())+
+ NLS.bind(JsfUIMessages.DISABLE_FACELET_HTML_VALIDATOR_MARKER_RESOLUTION_PROJECT_QUESTION, file.getProject().getName()),
+ MessageDialog.QUESTION_WITH_CANCEL,
+ new String[]{"Cancel", "Workspace", file.getProject().getName()},
+ 0);
int result = dialog.open();
if(result == 1){
disableOnWorkspace();
@@ -110,8 +98,30 @@
private void disableOnProject(){
MutableProjectSettings projectSettings = ValidationFramework.getDefault().getProjectSettings(file.getProject());
+ projectSettings.setOverride(true);
IMutableValidator[] validators = projectSettings.getValidators();
- if(disableValidator(validators, DisableFaceletHTMLValidatorResolutionGenerator.VALIDATOR_ID)){
+ if(!disableValidator(validators, DisableFaceletHTMLValidatorResolutionGenerator.VALIDATOR_ID)){
+ projectSettings = null;
+ MutableWorkspaceSettings workspaceSettings=null;
+ try {
+ workspaceSettings = ValidationFramework.getDefault().getWorkspaceSettings();
+ } catch (InvocationTargetException e) {
+ JsfUiPlugin.getPluginLog().logError(e);
+ }
+ if(workspaceSettings != null){
+ IMutableValidator[] workspaceValidators = workspaceSettings.getValidators();
+ IMutableValidator faceletHTMLValidator = findValidator(workspaceValidators, DisableFaceletHTMLValidatorResolutionGenerator.VALIDATOR_ID);
+ if(faceletHTMLValidator != null){
+ faceletHTMLValidator.setBuildValidation(false);
+ faceletHTMLValidator.setManualValidation(false);
+ validators = new IMutableValidator[1];
+ validators[0] = faceletHTMLValidator;
+ projectSettings = new MutableProjectSettings(file.getProject(), validators);
+ projectSettings.setOverride(true);
+ }
+ }
+ }
+ if(projectSettings != null){
ValidationFramework.getDefault().applyChanges(projectSettings, true);
try {
file.getProject().deleteMarkers(MARKER_TYPE, true, IResource.DEPTH_INFINITE);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/marker/DisableFaceletHTMLValidatorResolutionGenerator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/marker/DisableFaceletHTMLValidatorResolutionGenerator.java 2011-11-30 20:20:32 UTC (rev 36798)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/marker/DisableFaceletHTMLValidatorResolutionGenerator.java 2011-11-30 20:40:26 UTC (rev 36799)
@@ -17,7 +17,6 @@
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.IMarkerResolutionGenerator2;
import org.eclipse.wst.validation.IMutableValidator;
-import org.eclipse.wst.validation.MutableProjectSettings;
import org.eclipse.wst.validation.MutableWorkspaceSettings;
import org.eclipse.wst.validation.ValidationFramework;
import org.jboss.tools.jsf.ui.JsfUiPlugin;
@@ -33,19 +32,12 @@
public IMarkerResolution[] getResolutions(IMarker marker) {
if(isNeedToCreate(marker)){
- boolean forProject = false;
- IFile file = (IFile)marker.getResource();
IMutableValidator[] validators;
- MutableProjectSettings projectSettings = ValidationFramework.getDefault().getProjectSettings(file.getProject());
- validators = projectSettings.getValidators();
- if(DisableFaceletHTMLValidatorMarkerResolution.findValidator(validators, VALIDATOR_ID) != null){
- forProject = true;
- }
try {
MutableWorkspaceSettings workspaceSettings = ValidationFramework.getDefault().getWorkspaceSettings();
validators = workspaceSettings.getValidators();
if(DisableFaceletHTMLValidatorMarkerResolution.findValidator(validators, VALIDATOR_ID) != null){
- return new IMarkerResolution[] {new DisableFaceletHTMLValidatorMarkerResolution((IFile)marker.getResource(), forProject)};
+ return new IMarkerResolution[] {new DisableFaceletHTMLValidatorMarkerResolution((IFile)marker.getResource())};
}
} catch (InvocationTargetException e) {
JsfUiPlugin.getPluginLog().logError(e);
13 years
JBoss Tools SVN: r36798 - in trunk: jbpm/tests and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-11-30 15:20:32 -0500 (Wed, 30 Nov 2011)
New Revision: 36798
Modified:
trunk/bpmn/tests/pom.xml
trunk/jbpm/tests/pom.xml
Log:
revert move
Modified: trunk/bpmn/tests/pom.xml
===================================================================
--- trunk/bpmn/tests/pom.xml 2011-11-30 20:14:42 UTC (rev 36797)
+++ trunk/bpmn/tests/pom.xml 2011-11-30 20:20:32 UTC (rev 36798)
@@ -13,6 +13,7 @@
<packaging>pom</packaging>
<modules>
<module>org.jboss.tools.bpmn.ui.bot.test</module>
+ <module>org.eclipse.bpmn2.tests</module>
</modules>
</project>
Modified: trunk/jbpm/tests/pom.xml
===================================================================
--- trunk/jbpm/tests/pom.xml 2011-11-30 20:14:42 UTC (rev 36797)
+++ trunk/jbpm/tests/pom.xml 2011-11-30 20:20:32 UTC (rev 36798)
@@ -19,7 +19,6 @@
<module>org.jboss.tools.jbpm.convert.test</module>
<module>org.jbpm.gd.jpdl.test</module>
<module>org.jboss.tools.jbpm.ui.bot.test</module>
- <module>org.eclipse.bpmn2.tests</module>
</modules>
</project>
13 years
JBoss Tools SVN: r36795 - tags.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-11-30 14:44:45 -0500 (Wed, 30 Nov 2011)
New Revision: 36795
Added:
tags/hibernatetools-before-multiversion/
Log:
This tag is for hibernatetools component before it was merged with hibernatetools-multiversion2 branch
13 years
JBoss Tools SVN: r36794 - trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-11-30 13:21:46 -0500 (Wed, 30 Nov 2011)
New Revision: 36794
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/JBossPerspectiveFactory.java
Log:
https://issues.jboss.org/browse/JBIDE-10214 JBoss Perspective: Close outline and palette
forced to show CheatSheetView at the same folder as Palette and outline, perspective needs to be reseted before testing
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/JBossPerspectiveFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/JBossPerspectiveFactory.java 2011-11-30 17:39:25 UTC (rev 36793)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/JBossPerspectiveFactory.java 2011-11-30 18:21:46 UTC (rev 36794)
@@ -15,6 +15,8 @@
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
+import org.eclipse.ui.internal.PageLayout;
+import org.eclipse.ui.internal.cheatsheets.ICheatSheetResource;
import org.eclipse.ui.navigator.resources.ProjectExplorer;
import org.eclipse.ui.progress.IProgressConstants;
@@ -28,6 +30,7 @@
protected static final String ID_SERVERS_VIEW = "org.eclipse.wst.server.ui.ServersView"; //$NON-NLS-1$
protected static final String ID_SEARCH_VIEW = "org.eclipse.search.ui.views.SearchView"; //$NON-NLS-1$
protected static final String ID_CONSOLE_VIEW = "org.eclipse.ui.console.ConsoleView"; //$NON-NLS-1$
+ protected static final String ID_CHEATSHEET_VIEW = "org.eclipse.ui.cheatsheets.cheatSheetView"; //$NON-NLS-1$
/* (non-Javadoc)
* @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
@@ -81,5 +84,9 @@
// Top right.
IFolderLayout topRight = layout.createFolder("topRight", IPageLayout.RIGHT, 0.7f, editorArea);//$NON-NLS-1$
topRight.addView(IPageLayout.ID_OUTLINE);
+ // This line is required to force CheatSheetView placeholder, because it added by default as sticky view and
+ // to make placeholder working it should be removed first
+ ((PageLayout)layout).removePlaceholder(ICheatSheetResource.CHEAT_SHEET_VIEW_ID);
+ topRight.addPlaceholder(ICheatSheetResource.CHEAT_SHEET_VIEW_ID);
}
}
\ No newline at end of file
13 years
JBoss Tools SVN: r36793 - in trunk/vpe: features/org.jboss.tools.vpe.browsersim.feature and 11 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-11-30 12:39:25 -0500 (Wed, 30 Nov 2011)
New Revision: 36793
Modified:
trunk/vpe/features/org.jboss.tools.vpe.browsersim.feature/
trunk/vpe/features/org.jboss.tools.vpe.browsersim.feature/pom.xml
trunk/vpe/features/pom.xml
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/icons/sample.gif
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/plugin.xml
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/META-INF/MANIFEST.MF
trunk/vpe/plugins/pom.xml
trunk/vpe/site/site.xml
trunk/vpe/tests/org.jboss.tools.vpe.browsersim.browser.test/
Log:
https://issues.jboss.org/browse/JBIDE-9539 : Browsersim app for testing mobile/desktop web apps
- added BrowserSim plugins to the building process
- added support of running plugins from jars
- created new icons
Property changes on: trunk/vpe/features/org.jboss.tools.vpe.browsersim.feature
___________________________________________________________________
Added: svn:ignore
+ target
Modified: trunk/vpe/features/org.jboss.tools.vpe.browsersim.feature/pom.xml
===================================================================
--- trunk/vpe/features/org.jboss.tools.vpe.browsersim.feature/pom.xml 2011-11-30 17:27:02 UTC (rev 36792)
+++ trunk/vpe/features/org.jboss.tools.vpe.browsersim.feature/pom.xml 2011-11-30 17:39:25 UTC (rev 36793)
@@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools.vpe.browsersim</groupId>
+ <groupId>org.jboss.tools.vpe</groupId>
<artifactId>features</artifactId>
<version>3.3.0-SNAPSHOT</version>
</parent>
Modified: trunk/vpe/features/pom.xml
===================================================================
--- trunk/vpe/features/pom.xml 2011-11-30 17:27:02 UTC (rev 36792)
+++ trunk/vpe/features/pom.xml 2011-11-30 17:39:25 UTC (rev 36793)
@@ -15,5 +15,6 @@
<module>org.jboss.tools.vpe.feature</module>
<module>org.jboss.tools.vpe.test.feature</module>
<module>org.jboss.tools.xulrunner.feature</module>
+ <module>org.jboss.tools.vpe.browsersim.feature</module>
</modules>
</project>
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim
___________________________________________________________________
Modified: svn:ignore
- bin
+ bin
target
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/META-INF/MANIFEST.MF 2011-11-30 17:27:02 UTC (rev 36792)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/META-INF/MANIFEST.MF 2011-11-30 17:39:25 UTC (rev 36793)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: BrowserSim
Bundle-SymbolicName: org.jboss.tools.vpe.browsersim;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 3.3.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.swt;bundle-version="3.7.0",
org.jboss.tools.vpe.browsersim.browser;bundle-version="1.0.0"
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser
___________________________________________________________________
Modified: svn:ignore
- bin
+ bin
target
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/META-INF/MANIFEST.MF 2011-11-30 17:27:02 UTC (rev 36792)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/META-INF/MANIFEST.MF 2011-11-30 17:39:25 UTC (rev 36793)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: WebKit
Bundle-SymbolicName: org.jboss.tools.vpe.browsersim.browser;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 3.3.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-ExtensibleAPI: true
Export-Package: org.jboss.tools.vpe.browsersim.browser
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse
___________________________________________________________________
Modified: svn:ignore
- bin
+ bin
target
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/META-INF/MANIFEST.MF 2011-11-30 17:27:02 UTC (rev 36792)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/META-INF/MANIFEST.MF 2011-11-30 17:39:25 UTC (rev 36793)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: BrowserSim Eclipse Plug-in
Bundle-SymbolicName: org.jboss.tools.vpe.browsersim.eclipse;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 3.3.0.qualifier
Bundle-Activator: org.jboss.tools.vpe.browsersim.eclipse.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/icons/sample.gif
===================================================================
(Binary files differ)
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/plugin.xml 2011-11-30 17:27:02 UTC (rev 36792)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/plugin.xml 2011-11-30 17:39:25 UTC (rev 36793)
@@ -20,7 +20,7 @@
class="org.jboss.tools.vpe.browsersim.eclipse.handlers.RunBrowserSimHandler">
</handler>
</extension>
- <extension
+ <!--extension
point="org.eclipse.ui.bindings">
<key
commandId="org.jboss.tools.vpe.browsersim.eclipse.commands.runBrowserSim"
@@ -28,7 +28,7 @@
sequence="M1+6"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
</key>
- </extension>
+ </extension-->
<extension
point="org.eclipse.ui.menus">
<menuContribution
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java 2011-11-30 17:27:02 UTC (rev 36792)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java 2011-11-30 17:39:25 UTC (rev 36793)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.vpe.browsersim.eclipse.util;
+import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
@@ -26,8 +27,8 @@
public static void launchBrowserSim(String initialUrl) {
String pathSeparator = System.getProperty("path.separator");
- String classPath = getBundleLocation("org.jboss.tools.vpe.browsersim") + "bin/"
- + pathSeparator + getBundleLocation("org.jboss.tools.vpe.browsersim.browser") + "bin/"
+ String classPath = getBundleLocation("org.jboss.tools.vpe.browsersim")
+ + pathSeparator + getBundleLocation("org.jboss.tools.vpe.browsersim.browser")
+ pathSeparator + getBundleLocation("org.eclipse.swt")
+ pathSeparator + getBundleLocation("org.eclipse.swt." + PlatformUtil.CURRENT_PLATFORM);
String javaCommand = System.getProperty("java.home") + "/bin/java";
@@ -86,9 +87,20 @@
private static String getBundleLocation(String symbolicName) {
String locationId = Platform.getBundle(symbolicName).getLocation();
+ File bundleLocation;
if (locationId.startsWith("reference:file:")) {
- return locationId.substring("reference:file:".length());
+ bundleLocation = new File(locationId.substring("reference:file:".length()));
+ } else {
+ bundleLocation = new File(locationId);
}
- return locationId;
+
+ if (bundleLocation.isDirectory()) {
+ File binDirectory = new File(bundleLocation, "bin");
+ if (binDirectory.isDirectory()) {
+ bundleLocation = binDirectory;
+ }
+ }
+
+ return bundleLocation.getAbsolutePath();
}
}
Modified: trunk/vpe/plugins/pom.xml
===================================================================
--- trunk/vpe/plugins/pom.xml 2011-11-30 17:27:02 UTC (rev 36792)
+++ trunk/vpe/plugins/pom.xml 2011-11-30 17:39:25 UTC (rev 36793)
@@ -22,5 +22,8 @@
<module>org.jboss.tools.vpe.xulrunner</module>
<module>org.jboss.tools.xulrunner</module>
<module>org.jboss.tools.xulrunner.initializer</module>
+ <module>org.jboss.tools.vpe.browsersim.eclipse</module>
+ <module>org.jboss.tools.vpe.browsersim.browser</module>
+ <module>org.jboss.tools.vpe.browsersim</module>
</modules>
</project>
Modified: trunk/vpe/site/site.xml
===================================================================
--- trunk/vpe/site/site.xml 2011-11-30 17:27:02 UTC (rev 36792)
+++ trunk/vpe/site/site.xml 2011-11-30 17:39:25 UTC (rev 36793)
@@ -2,6 +2,7 @@
<site>
<description>To install these features, point Eclipse at this site.</description>
<!-- JBoss Tools vpe Nightly Build Update Site -->
+ <!--VPE-->
<category-def label="JBoss Tools vpe Nightly Build Update Site" name="JBoss Tools vpe Nightly Build Update Site">
<description>JBoss Tools vpe Nightly Build Update Site: contains all features in this build.</description>
</category-def>
@@ -11,6 +12,14 @@
<feature url="features/org.jboss.tools.vpe.test.feature_0.0.0.jar" id="org.jboss.tools.vpe.test.feature" version="0.0.0">
<category name="JBoss Tools VPE Test Nightly Build Update Site"/>
</feature>
+
+ <!--BrowserSim-->
+ <feature url="features/org.jboss.tools.vpe.browsersim.feature_0.0.0.jar" id="org.jboss.tools.vpe.browsersim.feature" version="0.0.0">
+ <category name="JBoss Tools vpe Nightly Build Update Site"/>
+ </feature>
+ <!--feature url="features/org.jboss.tools.vpe.test.feature_0.0.0.jar" id="org.jboss.tools.vpe.browsersim.test.feature" version="0.0.0">
+ <category name="JBoss Tools BrowserSim Test Nightly Build Update Site"/>
+ </feature-->
<!-- include but leave uncategorized -->
<feature url="features/org.mozilla.xulrunner.feature_0.0.0.jar" id="org.mozilla.xulrunner.feature" version="0.0.0">
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.browsersim.browser.test
___________________________________________________________________
Modified: svn:ignore
- bin
+ bin
target
13 years