JBoss Tools SVN: r35975 - trunk/documentation/whatsnew/as.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-25 05:36:06 -0400 (Tue, 25 Oct 2011)
New Revision: 35975
Modified:
trunk/documentation/whatsnew/as/as-news-3.3.0.M4.html
Log:
[JBIDE-10011] created N&N for AS
Modified: trunk/documentation/whatsnew/as/as-news-3.3.0.M4.html
===================================================================
--- trunk/documentation/whatsnew/as/as-news-3.3.0.M4.html 2011-10-25 09:00:08 UTC (rev 35974)
+++ trunk/documentation/whatsnew/as/as-news-3.3.0.M4.html 2011-10-25 09:36:06 UTC (rev 35975)
@@ -41,6 +41,7 @@
<p><small><a href="https://issues.jboss.org/browse/JBIDE-9783">Related Jira</a></small></p>
</td>
</tr>
+ <tr><td colspan="2"><hr /></td></tr>
<tr>
<td valign="top" align="right">
<p><b>Support for Web Fragments</b></p>
@@ -51,6 +52,7 @@
<p><small><a href="https://issues.jboss.org/browse/JBIDE-9836">Related Jira</a></small></p>
</td>
</tr>
+ <tr><td colspan="2"><hr /></td></tr>
<tr>
<td valign="top" align="right">
<p><b>OpenShift Express Adapter</b></p>
@@ -65,7 +67,6 @@
<p><small><a href="https://issues.jboss.org/browse/JBIDE-9856">Related Jira</a></small></p>
</td>
</tr>
- <tr><td colspan="2"><hr /></td></tr>
<tr>
<td colspan="2">
<hr/>
2 months, 4 weeks
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) {
14 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>
14 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)
14 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>
14 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);
14 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>
14 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
14 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
14 years