JBoss Tools SVN: r41012 - trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-05-14 20:32:15 -0400 (Mon, 14 May 2012)
New Revision: 41012
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityMarkerResolution.java
Log:
NPE when press OK on preference page https://issues.jboss.org/browse/JBIDE-11859
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityMarkerResolution.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityMarkerResolution.java 2012-05-14 23:50:54 UTC (rev 41011)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityMarkerResolution.java 2012-05-15 00:32:15 UTC (rev 41012)
@@ -22,6 +22,7 @@
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jface.preference.IPreferenceNode;
+import org.eclipse.jface.preference.IPreferencePage;
import org.eclipse.jface.preference.PreferenceManager;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Image;
@@ -93,15 +94,33 @@
}
private String getPreferenceLabel() {
+ String label = "";
WorkbenchPreferenceNode pageNode = findPageNode();
- pageNode.createPage();
- if(pageNode != null && pageNode.getPage() instanceof SeverityPreferencePage){
- SeverityPreferencePage page = (SeverityPreferencePage)pageNode.getPage();
- return cut(page.getLabel(preferenceKey));
+ if(pageNode != null){
+ IPreferencePage page = pageNode.getPage();
+ if(page == null){
+ pageNode.createPage();
+
+ page = pageNode.getPage();
+
+ label = getLabel(page);
+
+ pageNode.setPage(null);
+ page.dispose();
+ }else{
+ label = getLabel(page);
+ }
}
- return null;
+ return label;
}
+ private String getLabel(IPreferencePage page){
+ if(page instanceof SeverityPreferencePage){
+ return cut(((SeverityPreferencePage)page).getLabel(preferenceKey));
+ }
+ return "";
+ }
+
private String cut(String label){
if(label.length() > PREFERENCE_SIZE){
return label.substring(0, PREFERENCE_SIZE-1)+DOTS;
12 years, 8 months
JBoss Tools SVN: r41011 - in trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim: resources/config and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-05-14 19:50:54 -0400 (Mon, 14 May 2012)
New Revision: 41011
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/CustomMessageBox.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/SizeWarningDialog.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/ResizableSkinSizeAdvisor.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesList.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesListStorage.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/config/devices.cfg
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ExceptionNotifier.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ManageDevicesDialog.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/AppleIPhone3Skin.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/BrowserSimSkin.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/NativeSkin.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/ios/AppleIPhone3ResizableSkin.java
Log:
https://issues.jboss.org/browse/JBIDE-11739 : browsersim does not set the right height if monitor has lower resolution - should handle/warn about it
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesList.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesList.java 2012-05-14 23:21:13 UTC (rev 41010)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesList.java 2012-05-14 23:50:54 UTC (rev 41011)
@@ -22,11 +22,13 @@
private List<Device> devices;
private int selectedDeviceIndex;
private boolean useSkins;
+ private Boolean truncateWindow;
- public DevicesList(List<Device> devices, int selectedDeviceIndex, boolean useSkins) {
+ public DevicesList(List<Device> devices, int selectedDeviceIndex, boolean useSkins, Boolean truncateWindow) {
this.devices = devices;
this.selectedDeviceIndex = selectedDeviceIndex;
this.useSkins = useSkins;
+ this.truncateWindow = truncateWindow;
}
public List<Device> getDevices() {
@@ -54,4 +56,16 @@
setChanged();
}
}
+
+ public Boolean getTruncateWindow() {
+ return truncateWindow;
+ }
+
+ public void setTruncateWindow(Boolean truncateWindow) {
+ if ( (this.truncateWindow != null && !this.truncateWindow.equals(truncateWindow))
+ || (this.truncateWindow == null && truncateWindow != null)) {
+ this.truncateWindow = truncateWindow;
+ setChanged();
+ }
+ }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesListStorage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesListStorage.java 2012-05-14 23:21:13 UTC (rev 41010)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesListStorage.java 2012-05-14 23:50:54 UTC (rev 41011)
@@ -33,7 +33,7 @@
private static final String DEFAULT_PREFERENCES_RESOURCE = "config/devices.cfg";
private static final String USER_PREFERENCES_FOLDER = "org.jboss.tools.vpe.browsersim";
private static final String USER_PREFERENCES_FILE = "devices.cfg";
- private static final int CURRENT_CONFIG_VERSION = 4;
+ private static final int CURRENT_CONFIG_VERSION = 5;
public static void saveUserDefinedDevicesList(DevicesList devicesList) {
File configFolder = new File(USER_PREFERENCES_FOLDER);
@@ -74,7 +74,7 @@
Device device = new Device("Default", 1024, 768, null, null);
List<Device> devices = new ArrayList<Device>();
devices.add(device);
- devicesList = new DevicesList(devices, 0, true);
+ devicesList = new DevicesList(devices, 0, true, null);
}
return devicesList;
@@ -86,6 +86,9 @@
writer.write("ConfigVersion=" + String.valueOf(CURRENT_CONFIG_VERSION) + "\n");
writer.write("SelectedDeviceIndex=" + String.valueOf(devicesList.getSelectedDeviceIndex()) + "\n");
writer.write("UseSkins=" + String.valueOf(devicesList.getUseSkins()) + "\n");
+ Boolean truncateWindow = devicesList.getTruncateWindow();
+ String truncateWindowString = truncateWindow == null ? "" : truncateWindow.toString();
+ writer.write("TruncateWindow=" + truncateWindowString + "\n");
for (Device device : devicesList.getDevices()) {
writer.write( encode(device.getName() ));
@@ -118,6 +121,7 @@
List<Device> devices = null;
int selectedDeviceIndex = 0;
boolean useSkins = true;
+ Boolean truncateWindow = true;
try {
String nextLine;
@@ -147,6 +151,18 @@
}
}
+ if ((nextLine = reader.readLine()) != null) {
+ Pattern pattern = Pattern.compile("TruncateWindow=(true|false|)");
+ Matcher matcher = pattern.matcher(nextLine);
+ if (matcher.matches()) {
+ if ( "".equals(matcher.group(1)) ) {
+ truncateWindow = null;
+ } else {
+ truncateWindow = Boolean.parseBoolean(matcher.group(1));
+ }
+ }
+ }
+
Pattern devicePattern = Pattern.compile("^(.*)\\t(\\-?[0-9]+)\\t(\\-?[0-9]+)\\t(.+)?\\t(.+)?$");
devices = new ArrayList<Device>();
@@ -174,7 +190,7 @@
if (devices == null || devices.size() <= selectedDeviceIndex) {
return null;
} else {
- return new DevicesList(devices, selectedDeviceIndex, useSkins);
+ return new DevicesList(devices, selectedDeviceIndex, useSkins, truncateWindow);
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/config/devices.cfg
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/config/devices.cfg 2012-05-14 23:21:13 UTC (rev 41010)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/config/devices.cfg 2012-05-14 23:50:54 UTC (rev 41011)
@@ -1,6 +1,7 @@
-ConfigVersion=4
+ConfigVersion=5
SelectedDeviceIndex=2
UseSkins=true
+TruncateWindow=
Desktop (Default User-Agent) 1024 768
Apple iPad 2 768 1024 Mozilla/5.0 (iPad; U; CPU OS 4_3_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8G4 Safari/6533.18.5 iPhone 4
Apple iPhone 3 320 480 Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7 iPhone 3
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java 2012-05-14 23:21:13 UTC (rev 41010)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java 2012-05-14 23:50:54 UTC (rev 41011)
@@ -58,7 +58,9 @@
import org.jboss.tools.vpe.browsersim.model.DevicesListStorage;
import org.jboss.tools.vpe.browsersim.model.SkinMap;
import org.jboss.tools.vpe.browsersim.ui.skin.BrowserSimSkin;
+import org.jboss.tools.vpe.browsersim.ui.skin.ResizableSkinSizeAdvisor;
import org.jboss.tools.vpe.browsersim.util.ResourcesUtil;
+import org.w3c.dom.DOMConfiguration;
/**
* @author Yahor Radtsevich (yradtsevich)
@@ -79,6 +81,7 @@
private BrowserSimSkin skin;
private ControlHandler controlHandler;
private Image[] icons;
+ private ResizableSkinSizeAdvisor sizeAdvisor;
public static void main(String[] args) {
if (PlatformUtil.OS_MACOSX.equals(PlatformUtil.getOs())) {
@@ -478,9 +481,8 @@
? DeviceOrientation.PORTRAIT
: DeviceOrientation.LANDSCAPE);
Rectangle clientArea = getMonitorClientArea();
- skin.setOrientationAndSize(new Point(clientArea.width, clientArea.height),
- deviceOrientation.getOrientationAngle(),
- new Point(device.getWidth(), device.getHeight()));
+ skin.setOrientationAndSize( deviceOrientation.getOrientationAngle(), new Point(device.getWidth(), device.getHeight()),
+ getSizeAdvisor());
fixShellLocation(clientArea);
deviceOrientation.addObserver(new Observer() {
public void update(Observable o, Object arg) {
@@ -520,7 +522,7 @@
private void fireOrientationChangeEvent(int orientation, Point browserSize) {
Rectangle clientArea = getMonitorClientArea();
- skin.setOrientationAndSize(new Point(clientArea.width, clientArea.height), orientation, browserSize);
+ skin.setOrientationAndSize(orientation, browserSize, getSizeAdvisor());
fixShellLocation(clientArea);
skin.getBrowser().execute("window.orientation = " + orientation + ";"
+ "(function(){"
@@ -631,4 +633,43 @@
browser.setFocus();
}
}
+
+ private ResizableSkinSizeAdvisor getSizeAdvisor() {
+ if (sizeAdvisor == null) {
+ sizeAdvisor = new ResizableSkinSizeAdvisor() {
+ @Override
+ public Point checkWindowSize(int orientation, Point prefferedSize,
+ Point prefferedShellSize) {
+ DevicesList devicesList = devicesListHolder.getDevicesList();
+ Rectangle clientArea = getMonitorClientArea();
+
+ boolean truncateWindow = false;
+ if (devicesList.getTruncateWindow() == null) {
+ if (prefferedShellSize.x > clientArea.width || prefferedShellSize.y > clientArea.height) {
+ SizeWarningDialog dialog = new SizeWarningDialog(skin.getShell(), new Point(clientArea.width, clientArea.height), prefferedShellSize, "[TODO]",
+ orientation == DeviceOrientation.PORTRAIT || orientation == DeviceOrientation.PORTRAIT_INVERTED);
+ dialog.open();
+
+ truncateWindow = dialog.getTruncateWindow();
+ if (dialog.getRememberDecision()) {
+ devicesList.setTruncateWindow(truncateWindow);
+ }
+ }
+ } else {
+ truncateWindow = devicesList.getTruncateWindow();
+ }
+
+ Point size = new Point(prefferedShellSize.x, prefferedShellSize.y);
+ if (truncateWindow) {
+ size.x = Math.min(prefferedShellSize.x, clientArea.width);
+ size.y = Math.min(prefferedShellSize.y, clientArea.height);
+ }
+
+ return size;
+ }
+ };
+ }
+
+ return sizeAdvisor;
+ }
}
Added: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/CustomMessageBox.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/CustomMessageBox.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/CustomMessageBox.java 2012-05-14 23:50:54 UTC (rev 41011)
@@ -0,0 +1,87 @@
+package org.jboss.tools.vpe.browsersim.ui;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Dialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+class CustomMessageBox extends Dialog {
+ private Shell shell;
+ private Composite messageComposite;
+ private Composite buttonsComposite;
+ private Image icon;
+
+ public CustomMessageBox(Shell parent, Image icon) {
+ super(parent, SWT.NONE);
+ this.icon = icon;
+ }
+
+ public void open() {
+ createWidgets();
+ shell.open();
+ Display display = getParent().getDisplay();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) {
+ display.sleep();
+ }
+ }
+ }
+
+ protected void createWidgets() {
+ shell = new Shell(getParent(), SWT.DIALOG_TRIM);
+ GridLayout shellLayout = new GridLayout(1, true);
+ shellLayout.marginHeight = 0;
+ shellLayout.marginWidth = 0;
+ shellLayout.verticalSpacing = 0;
+ shell.setLayout(shellLayout);
+ shell.setText(getText());
+
+ messageComposite = new Composite(shell, SWT.NONE);
+ GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ messageComposite.setLayoutData(gridData);
+ RowLayout messageCompositeLayout = new RowLayout(SWT.HORIZONTAL);
+ messageCompositeLayout.marginHeight = 22;
+ messageCompositeLayout.marginWidth = 22;
+ messageCompositeLayout.spacing = 10;
+ messageCompositeLayout.center = true;
+ messageComposite.setLayout(messageCompositeLayout);
+ messageComposite.setBackground(getMessageCompositeBackground());
+
+ if (icon != null) {
+ Label iconLabel = new Label(messageComposite, SWT.NONE);
+ iconLabel.setImage(icon);
+ iconLabel.setBackground(getMessageCompositeBackground());
+ }
+
+ buttonsComposite = new Composite(shell, SWT.NONE);
+ gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ buttonsComposite.setLayoutData(gridData);
+ GridLayout buttonsCompositeLayout = new GridLayout(1, false);
+ buttonsCompositeLayout.marginHeight = 10;
+ buttonsCompositeLayout.marginWidth = 10;
+ buttonsComposite.setLayout(buttonsCompositeLayout);
+ }
+
+ protected Composite getMessageComposite() {
+ return messageComposite;
+ }
+
+ protected Composite getButtonsComposite() {
+ return buttonsComposite;
+ }
+
+ protected Color getMessageCompositeBackground() {
+ return getParent().getDisplay().getSystemColor(SWT.COLOR_WHITE);
+ }
+
+ protected Shell getShell() {
+ return shell;
+ }
+}
\ No newline at end of file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ExceptionNotifier.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ExceptionNotifier.java 2012-05-14 23:21:13 UTC (rev 41010)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ExceptionNotifier.java 2012-05-14 23:50:54 UTC (rev 41011)
@@ -16,18 +16,10 @@
import org.eclipse.swt.SWTError;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.program.Program;
import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Dialog;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.MessageBox;
@@ -38,7 +30,6 @@
* @author Yahor Radtsevich (yradtsevich)
*/
public class ExceptionNotifier {
-
/**
* Should be used to notify user about WebKit-loading errors
*/
@@ -79,84 +70,47 @@
}
}
+
/**
* Behaves like MessageBox with styles SWT.OK and SWT.ICON_ERROR, but allows HTML links is messages.
* @author Yahor Radtsevich (yradtsevich)
*
*/
-class ErrorMessageBoxWithLinks extends Dialog {
- private Shell shell;
+class ErrorMessageBoxWithLinks extends CustomMessageBox {
+
private String message;
public ErrorMessageBoxWithLinks(Shell parent) {
- super(parent, SWT.NONE);
+ super(parent, parent.getDisplay().getSystemImage(SWT.ICON_ERROR));
message = "";
}
- public void open() {
- shell = new Shell(getParent(), SWT.DIALOG_TRIM);
- GridLayout shellLayout = new GridLayout(1, true);
- shellLayout.marginHeight = 0;
- shellLayout.marginWidth = 0;
- shellLayout.verticalSpacing = 0;
- shell.setLayout(shellLayout);
- shell.setText(getText());
-
- Color whiteColor = getParent().getDisplay().getSystemColor(SWT.COLOR_WHITE);
- Composite messageComposite = new Composite(shell, SWT.NONE);
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- messageComposite.setLayoutData(gridData);
- RowLayout messageCompositeLayout = new RowLayout(SWT.HORIZONTAL);
- messageCompositeLayout.marginHeight = 22;
- messageCompositeLayout.marginWidth = 22;
- messageCompositeLayout.spacing = 10;
- messageCompositeLayout.center = true;
- messageComposite.setLayout(messageCompositeLayout);
- messageComposite.setBackground(whiteColor);
-
- Image errorImage = shell.getDisplay().getSystemImage(SWT.ICON_ERROR);
- Label imageLabel = new Label(messageComposite, SWT.NONE);
- imageLabel.setImage(errorImage);
- imageLabel.setBackground(whiteColor);
- Link link = new Link(messageComposite, SWT.WRAP);
+ @Override
+ protected void createWidgets() {
+ super.createWidgets();
+
+ Link link = new Link(getMessageComposite(), SWT.WRAP);
link.setText(message);
- link.setBackground(whiteColor);
+ link.setBackground(getMessageCompositeBackground());
link.addListener (SWT.Selection, new Listener () {
public void handleEvent(Event event) {
Program.launch(event.text);
}
});
- Composite okComposite = new Composite(shell, SWT.NONE);
- gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- okComposite.setLayoutData(gridData);
- GridLayout okCompositeLayout = new GridLayout(1, false);
- okCompositeLayout.marginHeight = 10;
- okCompositeLayout.marginWidth = 10;
- okComposite.setLayout(okCompositeLayout);
-
- Button ok = new Button(okComposite, SWT.PUSH);
+ Button ok = new Button(getButtonsComposite(), SWT.PUSH);
ok.setText("OK");
ok.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- shell.close();
+ getShell().close();
}
});
GridData okLayoutData = new GridData(SWT.END, SWT.CENTER, true, true);
okLayoutData.widthHint = 88;
ok.setLayoutData(okLayoutData);
- shell.setDefaultButton(ok);
-
-
- shell.pack();
- shell.open();
- Display display = getParent().getDisplay();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
+ getShell().setDefaultButton(ok);
+ getShell().pack();
}
public void setMessage(String message) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ManageDevicesDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ManageDevicesDialog.java 2012-05-14 23:21:13 UTC (rev 41010)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ManageDevicesDialog.java 2012-05-14 23:50:54 UTC (rev 41011)
@@ -15,13 +15,17 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowData;
+import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
@@ -40,8 +44,14 @@
protected List<Device> devices;
protected int selectedDeviceIndex;
protected Shell shell;
- private Table table;
- private DevicesList resultDevicesList;
+ protected Table table;
+ protected DevicesList resultDevicesList;
+ protected boolean useSkins;
+ protected Boolean truncateWindow;
+ protected Button askBeforeTruncateRadio;
+ protected Button alwaysTruncateRadio;
+ protected Button neverTruncateRadio;
+ protected Button useSkinsCheckbox;
/**
* Create the dialog.
@@ -55,6 +65,8 @@
this.oldDevicesList = oldDevicesList;
this.devices = new ArrayList<Device>(oldDevicesList.getDevices());
this.selectedDeviceIndex = oldDevicesList.getSelectedDeviceIndex();
+ this.useSkins = oldDevicesList.getUseSkins();
+ this.truncateWindow = oldDevicesList.getTruncateWindow();
}
/**
@@ -81,18 +93,23 @@
shell = new Shell(getParent(), getStyle());
shell.setSize(650, 450);
shell.setText(getText());
- shell.setLayout(new GridLayout(2, false));
+ shell.setLayout(new GridLayout(1, false));
+
+ Group devicesGroup = new Group(shell, SWT.NONE);
+ devicesGroup.setText("Devices");
+ devicesGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ devicesGroup.setLayout(new GridLayout(2, false));
- table = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);
+ table = new Table(devicesGroup, SWT.BORDER | SWT.FULL_SELECTION);
table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
table.setHeaderVisible(true);
- table.setLinesVisible(true);
table.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
selectedDeviceIndex = ((Table)e.widget).getSelectionIndex();
}
});
+
TableColumn tableColumnName = new TableColumn(table, SWT.NONE);
tableColumnName.setWidth(100);
tableColumnName.setText(Messages.ManageDevicesDialog_NAME);
@@ -113,11 +130,12 @@
tableColumnSkin.setWidth(100);
tableColumnSkin.setText(Messages.ManageDevicesDialog_SKIN);
- Composite compositeControls = new Composite(shell, SWT.NONE);
+ Composite compositeControls = new Composite(devicesGroup, SWT.NONE);
compositeControls.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1));
compositeControls.setLayout(new FillLayout(SWT.VERTICAL));
Button buttonAdd = new Button(compositeControls, SWT.NONE);
+ buttonAdd.setSize(88, SWT.DEFAULT);
buttonAdd.setText(Messages.ManageDevicesDialog_ADD);
buttonAdd.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -169,36 +187,90 @@
updateDevices();
}
});
+
+ Group useSkinsGroup = new Group(shell, SWT.NONE);
+ useSkinsGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+ useSkinsGroup.setLayout(new RowLayout(SWT.VERTICAL));
+ useSkinsGroup.setText("Skins options");
+ useSkinsCheckbox = new Button(useSkinsGroup, SWT.CHECK);
+ useSkinsCheckbox.setText("Use skins");
+ useSkinsCheckbox.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Button checkbox = (Button) e.widget;
+ useSkins = checkbox.getSelection();
+ }
+ });
+
+ Group truncateWindowGroup = new Group(shell, SWT.NONE);
+ truncateWindowGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+ truncateWindowGroup.setText("Truncate the browser window when it does not fit display");
+ truncateWindowGroup.setLayout(new RowLayout(SWT.HORIZONTAL));
+
+
+ alwaysTruncateRadio = new Button(truncateWindowGroup, SWT.RADIO);
+ alwaysTruncateRadio.setText("Always truncate");
+
+ neverTruncateRadio = new Button(truncateWindowGroup, SWT.RADIO);
+ neverTruncateRadio.setText("Never truncate");
- new Label(compositeControls, SWT.NONE);
+ askBeforeTruncateRadio = new Button(truncateWindowGroup, SWT.RADIO);
+ askBeforeTruncateRadio.setText("Prompt");
- Button buttonLoadDefaults = new Button(compositeControls, SWT.NONE);
+ SelectionListener truncateSelectionListener = new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Button radio = (Button) e.widget;
+ if (radio.getSelection()) {
+ if (radio == askBeforeTruncateRadio) {
+ truncateWindow = null;
+ } else if (radio == alwaysTruncateRadio) {
+ truncateWindow = true;
+ } else if (radio == neverTruncateRadio) {
+ truncateWindow = false;
+ }
+ }
+ }
+ };
+
+ askBeforeTruncateRadio.addSelectionListener(truncateSelectionListener);
+ alwaysTruncateRadio.addSelectionListener(truncateSelectionListener);
+ neverTruncateRadio.addSelectionListener(truncateSelectionListener);
+
+
+ Composite compositeOkCancel = new Composite(shell, SWT.NONE);
+ compositeOkCancel.setLayout(new GridLayout(2, true));
+ compositeOkCancel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 2, 1));
+
+ new Label(compositeOkCancel, SWT.NONE);
+
+ Button buttonLoadDefaults = new Button(compositeOkCancel, SWT.NONE);
buttonLoadDefaults.setText(Messages.ManageDevicesDialog_LOAD_DEFAULTS);
buttonLoadDefaults.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
DevicesList defaultDevicesList = DevicesListStorage.loadDefaultDevicesList();
devices = defaultDevicesList.getDevices();
selectedDeviceIndex = defaultDevicesList.getSelectedDeviceIndex();
+ useSkins = defaultDevicesList.getUseSkins();
+ truncateWindow = defaultDevicesList.getTruncateWindow();
updateDevices();
}
});
- Composite compositeOkCancel = new Composite(shell, SWT.NONE);
- compositeOkCancel.setLayout(new FillLayout(SWT.HORIZONTAL));
- compositeOkCancel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 2, 1));
-
Button buttonOk = new Button(compositeOkCancel, SWT.NONE);
buttonOk.setText(Messages.ManageDevicesDialog_OK);
+ buttonOk.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
shell.setDefaultButton(buttonOk);
buttonOk.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- resultDevicesList = new DevicesList(devices, selectedDeviceIndex, oldDevicesList.getUseSkins());
+ resultDevicesList = new DevicesList(devices, selectedDeviceIndex, useSkins, truncateWindow);
shell.close();
}
});
Button buttonCancel = new Button(compositeOkCancel, SWT.NONE);
buttonCancel.setText(Messages.ManageDevicesDialog_CANCEL);
+ buttonCancel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
buttonCancel.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
resultDevicesList = null;
@@ -210,7 +282,7 @@
updateDevices();
}
- public void updateDevices() {
+ public void updateDevices() {//TODO
table.removeAll();
for (Device device : devices) {
TableItem tableItem = new TableItem(table, SWT.NONE);
@@ -223,5 +295,11 @@
});
}
table.setSelection(selectedDeviceIndex);
+
+ useSkinsCheckbox.setSelection(useSkins);
+
+ askBeforeTruncateRadio.setSelection(truncateWindow == null);
+ alwaysTruncateRadio.setSelection(truncateWindow != null && Boolean.TRUE.equals(truncateWindow));
+ neverTruncateRadio.setSelection(truncateWindow != null && Boolean.FALSE.equals(truncateWindow));
}
}
Added: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/SizeWarningDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/SizeWarningDialog.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/SizeWarningDialog.java 2012-05-14 23:50:54 UTC (rev 41011)
@@ -0,0 +1,101 @@
+package org.jboss.tools.vpe.browsersim.ui;
+
+import java.text.MessageFormat;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+class SizeWarningDialog extends CustomMessageBox {
+ private Point actualSize;
+ private Point requiredSize;
+ private String deviceName;
+ private boolean vertical;
+ private boolean truncateWindow = false;
+ private boolean rememberDecision = false;
+
+ public SizeWarningDialog(Shell parent, Point actualSize, Point requiredSize, String deviceName, boolean vertical) {
+ super(parent, parent.getDisplay().getSystemImage(SWT.ICON_INFORMATION));
+ this.actualSize = actualSize;
+ this.requiredSize = requiredSize;
+ this.deviceName = deviceName;
+ this.vertical = vertical;
+ setText("Device size will be truncated");
+ }
+
+ @Override
+ protected void createWidgets() {
+ super.createWidgets();
+
+ Composite messageRow = new Composite(getMessageComposite(), SWT.NONE);
+ messageRow.setLayout(new RowLayout(SWT.VERTICAL));
+ messageRow.setBackground(getMessageCompositeBackground());
+
+ Label message = new Label(messageRow, SWT.WRAP);
+ String messageText;
+ if (vertical) {
+ messageText = MessageFormat.format("Your desktop size ({0}x{1} pixels) is smaller than what {2} needs in vertical layout ({3}x{4}).\n" +
+ "Device size will be truncated to fit your desktop.",
+ actualSize.x, actualSize.y, deviceName, requiredSize.x, requiredSize.y);
+ } else {
+ messageText = MessageFormat.format("Your desktop size ({0}x{1} pixels) is smaller than what {2} needs in horizontal layout ({3}x{4}).\n" +
+ "Device size will be truncated to fit your desktop.",
+ actualSize.x, actualSize.y, deviceName, requiredSize.x, requiredSize.y);
+ }
+ message.setText(messageText);
+ message.setBackground(getMessageCompositeBackground());
+
+ Button rememberDecisionCheckbox = new Button(messageRow, SWT.CHECK);
+ rememberDecisionCheckbox.setText("Remember my decision (this can be changed in the Preferences dialog later).");
+ rememberDecisionCheckbox.setBackground(getMessageCompositeBackground());
+ rememberDecisionCheckbox.setSelection(rememberDecision);
+ rememberDecisionCheckbox.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ rememberDecision = ((Button)e.widget).getSelection();
+ }
+ });
+
+ Composite buttonRow = new Composite(getButtonsComposite(), SWT.NONE);
+ buttonRow.setLayout(new RowLayout(SWT.HORIZONTAL));
+ GridData buttonRowLayoutData = new GridData(SWT.END, SWT.CENTER, true, true);
+ buttonRow.setLayoutData(buttonRowLayoutData);
+
+ Button okButton = new Button(buttonRow, SWT.PUSH);
+ okButton.setText("Yes (recommended)");
+ okButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ truncateWindow = true;
+ getShell().close();
+ }
+ });
+
+ Button noButton = new Button(buttonRow, SWT.PUSH);
+ noButton.setText("No, show me actual size");
+ noButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ getShell().close();
+ }
+ });
+
+ getShell().setDefaultButton(okButton);
+ getShell().pack();
+ }
+
+ public boolean getTruncateWindow() {
+ return truncateWindow;
+ }
+
+ public boolean getRememberDecision() {
+ return rememberDecision;
+ }
+}
\ No newline at end of file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/AppleIPhone3Skin.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/AppleIPhone3Skin.java 2012-05-14 23:21:13 UTC (rev 41010)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/AppleIPhone3Skin.java 2012-05-14 23:50:54 UTC (rev 41011)
@@ -345,7 +345,7 @@
@Override
- public void setOrientationAndSize(Point maximumShellSize, int orientation, Point browserSize) {
+ public void setOrientationAndSize(int orientation, Point browserSize, ResizableSkinSizeAdvisor sizeAdvisor) {
// browserSize is ignored by this skin
if ((this.orientation == DeviceOrientation.PORTRAIT || this.orientation == DeviceOrientation.PORTRAIT_INVERTED) &&
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/BrowserSimSkin.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/BrowserSimSkin.java 2012-05-14 23:21:13 UTC (rev 41010)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/BrowserSimSkin.java 2012-05-14 23:50:54 UTC (rev 41011)
@@ -33,7 +33,7 @@
void pageTitleChanged(String newTitle);
void progressChanged(int percents); // -1 for completed
void statusTextChanged(String newStatusText);
- void setOrientationAndSize(Point maximumShellSize, int orientation, Point browserSize);
+ void setOrientationAndSize(int orientation, Point browserSize, ResizableSkinSizeAdvisor sizeAdvisor);
void setAddressBarVisible(boolean visible);
void setContextMenu(Menu contextMenu);
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/NativeSkin.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/NativeSkin.java 2012-05-14 23:21:13 UTC (rev 41010)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/NativeSkin.java 2012-05-14 23:50:54 UTC (rev 41011)
@@ -230,24 +230,26 @@
}
@Override
- public void setOrientationAndSize(Point maximumShellSize, int orientation, Point browserSize) {
+ public void setOrientationAndSize(int orientation, Point browserSize, ResizableSkinSizeAdvisor sizeAdvisor) {
GridData data = (GridData) browser.getLayoutData();
int shellWidthHint = SWT.DEFAULT;
if (browserSize.x != Device.DEFAULT_SIZE) {
data.widthHint = browserSize.x;
- } else if (data.widthHint == SWT.DEFAULT) {
- shellWidthHint = maximumShellSize.x;
- }
+ }
+// else if (data.widthHint == SWT.DEFAULT) {
+// shellWidthHint = maximumShellSize.x;
+// }
int shellHeightHint = SWT.DEFAULT;
if (browserSize.y != Device.DEFAULT_SIZE) {
data.heightHint = browserSize.y;
- } else if (data.heightHint == SWT.DEFAULT) {
- shellHeightHint = maximumShellSize.y;
}
- Point shellSize = shell.computeSize(shellWidthHint, shellHeightHint);
- shellSize.x = Math.min(shellSize.x, maximumShellSize.x);
- shellSize.y = Math.min(shellSize.y, maximumShellSize.y);
+// else if (data.heightHint == SWT.DEFAULT) {
+// shellHeightHint = maximumShellSize.y;
+// }
+ Point prefferedShellSize = shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+
+ Point shellSize = sizeAdvisor.checkWindowSize(orientation, browserSize, prefferedShellSize);
shell.setSize(shellSize);
}
Added: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/ResizableSkinSizeAdvisor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/ResizableSkinSizeAdvisor.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/ResizableSkinSizeAdvisor.java 2012-05-14 23:50:54 UTC (rev 41011)
@@ -0,0 +1,7 @@
+package org.jboss.tools.vpe.browsersim.ui.skin;
+
+import org.eclipse.swt.graphics.Point;
+
+public interface ResizableSkinSizeAdvisor {
+ public Point checkWindowSize(int orientation, Point prefferedSize, Point prefferedShellSize);
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/ios/AppleIPhone3ResizableSkin.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/ios/AppleIPhone3ResizableSkin.java 2012-05-14 23:21:13 UTC (rev 41010)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/ios/AppleIPhone3ResizableSkin.java 2012-05-14 23:50:54 UTC (rev 41011)
@@ -21,6 +21,7 @@
import org.jboss.tools.vpe.browsersim.ui.skin.DeviceComposite;
import org.jboss.tools.vpe.browsersim.ui.skin.ImageDescriptor;
import org.jboss.tools.vpe.browsersim.ui.skin.ResizableSkin;
+import org.jboss.tools.vpe.browsersim.ui.skin.ResizableSkinSizeAdvisor;
public class AppleIPhone3ResizableSkin extends ResizableSkin {
private static final Point NORMAL_SKREEN_SIZE = new Point(320, 480);
@@ -234,7 +235,7 @@
}
@Override
- public void setOrientationAndSize(Point maximumShellSize, int orientation, Point browserSize) {
+ public void setOrientationAndSize(int orientation, Point browserSize, ResizableSkinSizeAdvisor sizeAdvisor) {
vertical = (orientation == DeviceOrientation.PORTRAIT || orientation == DeviceOrientation.PORTRAIT_INVERTED);
String urlTextText = deviceComposite.getUrlText().getText();
String pageTitle = deviceComposite.getPageTitleStyledText() != null ? deviceComposite.getPageTitleStyledText().getText() : "";
@@ -252,20 +253,22 @@
browser.setParent(browserContainer);
oldDeviceComposite.dispose();
Point bordersSize = getBordersSize(vertical);
- int shellWidth;
+ int shellWidthHint;
if (browserSize.x == SWT.DEFAULT) {
- shellWidth = SWT.DEFAULT;
+ shellWidthHint = SWT.DEFAULT;
} else {
- shellWidth = Math.min(bordersSize.x + browserSize.x, maximumShellSize.x);
+ shellWidthHint = bordersSize.x + browserSize.x;
}
- int shellHeight;
+ int shellHeightHint;
if (browserSize.y == SWT.DEFAULT) {
- shellHeight = SWT.DEFAULT;
+ shellHeightHint = SWT.DEFAULT;
} else {
- shellHeight = Math.min(bordersSize.y + browserSize.y, maximumShellSize.y);
+ shellHeightHint = bordersSize.y + browserSize.y;
}
- shell.setSize(shell.computeSize(shellWidth, shellHeight));
+ Point prefferedShellSize = shell.computeSize(shellWidthHint, shellHeightHint);
+ Point shellSize = sizeAdvisor.checkWindowSize(orientation, browserSize, prefferedShellSize);
+ shell.setSize(shellSize);
shell.layout(true);
setShellRegion();
12 years, 8 months
JBoss Tools SVN: r41010 - in trunk/ws/docs/soap_reference/en-US: images/client and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-05-14 19:21:13 -0400 (Mon, 14 May 2012)
New Revision: 41010
Modified:
trunk/ws/docs/soap_reference/en-US/Book_Info.xml
trunk/ws/docs/soap_reference/en-US/images/client/jbossws_client_2.png
Log:
updated image for TOOLSDOC-189
Modified: trunk/ws/docs/soap_reference/en-US/Book_Info.xml
===================================================================
--- trunk/ws/docs/soap_reference/en-US/Book_Info.xml 2012-05-14 21:52:16 UTC (rev 41009)
+++ trunk/ws/docs/soap_reference/en-US/Book_Info.xml 2012-05-14 23:21:13 UTC (rev 41010)
@@ -7,7 +7,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>5.0</productnumber>
<edition>5.0.0</edition>
- <pubsnumber>6</pubsnumber>
+ <pubsnumber>7</pubsnumber>
<abstract>
<para>The JBoss SOAP Web Services User Guide explains how to use the JBoss Web Services module to implement SOAP web services in Java.</para>
</abstract>
Modified: trunk/ws/docs/soap_reference/en-US/images/client/jbossws_client_2.png
===================================================================
(Binary files differ)
12 years, 8 months
JBoss Tools SVN: r41009 - workspace/fred/repositories/snapshot/org/jboss/errai/archetypes/kitchensink-quickstart/2.0.0.Final-JBT.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-05-14 17:52:16 -0400 (Mon, 14 May 2012)
New Revision: 41009
Modified:
workspace/fred/repositories/snapshot/org/jboss/errai/archetypes/kitchensink-quickstart/2.0.0.Final-JBT/kitchensink-quickstart-2.0.0.Final-JBT.jar
Log:
Add errai archetype compatible with EAP ER6 / WFK ER5 repos
Modified: workspace/fred/repositories/snapshot/org/jboss/errai/archetypes/kitchensink-quickstart/2.0.0.Final-JBT/kitchensink-quickstart-2.0.0.Final-JBT.jar
===================================================================
(Binary files differ)
12 years, 8 months
JBoss Tools SVN: r41008 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-05-14 16:20:29 -0400 (Mon, 14 May 2012)
New Revision: 41008
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
Log:
https://issues.jboss.org/browse/JBIDE-11815 Default for Configuration on New Seam Project wizard should be Seam 2.3 when JBoss AS 7 is selected as Target runtime
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2012-05-14 20:00:20 UTC (rev 41007)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2012-05-14 20:20:29 UTC (rev 41008)
@@ -141,11 +141,11 @@
return firstPage;
}
- private static final String templateJstSeam1 = "template.jst.seam"; //$NON-NLS-1$
- private static final String templateJstSeam2 = "template.jst.seam2"; //$NON-NLS-1$
- private static final String templateJstSeam21 = "template.jst.seam21"; //$NON-NLS-1$
- private static final String templateJstSeam22 = "template.jst.seam22"; //$NON-NLS-1$
- private static final String templateJstSeam23 = "template.jst.seam23"; //$NON-NLS-1$
+ static final String templateJstSeam1 = "template.jst.seam"; //$NON-NLS-1$
+ static final String templateJstSeam2 = "template.jst.seam2"; //$NON-NLS-1$
+ static final String templateJstSeam21 = "template.jst.seam21"; //$NON-NLS-1$
+ static final String templateJstSeam22 = "template.jst.seam22"; //$NON-NLS-1$
+ static final String templateJstSeam23 = "template.jst.seam23"; //$NON-NLS-1$
private static final Map<String, String> templates = new HashMap<String, String>();
static {
@@ -577,7 +577,7 @@
return launchNewServerWizard(shell, model, null);
}
- private boolean setWebModuleVersion() {
+ public boolean isAs7Selected() {
String runtimeName = serverRuntimeTargetCombo.getText();
if(RuntimeManager.isRuntimeDefined(runtimeName)) {
IRuntime targetRuntime = RuntimeManager.getRuntime(runtimeName);
@@ -586,12 +586,7 @@
for (IRuntimeComponent component : components) {
String typeId = component.getProperty("type-id");
if(typeId!=null && typeId.startsWith("org.jboss.ide.eclipse.as.runtime.7")) {
- if(primaryVersionCombo.getItemCount()>0) {
-// System.out.println(primaryVersionCombo.getItem(primaryVersionCombo.getItemCount()-1));
- primaryVersionCombo.select(primaryVersionCombo.getItemCount()-1);
- return true;
- }
- break;
+ return true;
}
}
}
@@ -599,6 +594,21 @@
return false;
}
+ public boolean setWebModuleVersion() {
+ if(isAs7Selected() && primaryVersionCombo.getItemCount()>0) {
+ primaryVersionCombo.select(primaryVersionCombo.getItemCount()-1);
+ seamConfigTemplate = templateJstSeam23;
+ SeamProjectWizard.this.template = ProjectFacetsManager.getTemplate(seamConfigTemplate);
+ getFacetedProjectWorkingCopy().setFixedProjectFacets(SeamProjectWizard.this.template.getFixedProjectFacets());
+
+ final IPreset preset = SeamProjectWizard.this.template.getInitialPreset();
+ getFacetedProjectWorkingCopy().setSelectedPreset(preset.getId());
+
+ return true;
+ }
+ return false;
+ }
+
@Override
public IProjectFacetVersion getPrimaryFacetVersion() {
return super.getPrimaryFacetVersion();
12 years, 8 months
JBoss Tools SVN: r41007 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: ldimaggio
Date: 2012-05-14 16:00:20 -0400 (Mon, 14 May 2012)
New Revision: 41007
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
Log:
Updated to include:
SWTEclipseExt.java
/* To work around bug https://issues.jboss.org/browse/JBIDE-11567 - ldimaggi - April 2012 */
//bot.table(0).select("default");
ExampleTest.java
/* Temporary fix needed by - https://issues.jboss.org/browse/JBIDE-11781
* Close the Quick Fix shell/dialog - or the project explorer cannot find the
* webservice_producer|client projects in the project explorer - ldimaggi - May 2012 */
try {
bot.shell("Quick Fix").bot().button(IDELabel.Button.FINISH).click();
}
catch (Exception E) {
log.info("Condition from https://issues.jboss.org/browse/JBIDE-11781 not found " + E.getMessage());
}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java 2012-05-14 19:58:03 UTC (rev 41006)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java 2012-05-14 20:00:20 UTC (rev 41007)
@@ -7,6 +7,7 @@
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.JBossToolsProjectExamples;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
@@ -99,9 +100,7 @@
protected void importExample(SWTBot wiz) {
String hasProjName = wiz.textWithLabel(JBossToolsProjectExamples.TEXT_PROJECT_NAME).getText();
- System.out.println("DEBUG1 - " + JBossToolsProjectExamples.TEXT_PROJECT_NAME );
-
- assertTrue(String.format("Example project name changed, have '%s', expected '%s'",hasProjName,getProjectNames()[0]),hasProjName.equals(getProjectNames()[0]));
+ //assertTrue(String.format("Example project name changed, have '%s', expected '%s'",hasProjName,getProjectNames()[0]),hasProjName.equals(getProjectNames()[0]));
int projSize = getProjectSize(wiz.textWithLabel(JBossToolsProjectExamples.TEXT_PROJECT_SIZE).getText());
wiz.button(IDELabel.Button.FINISH).click();
SWTBotShell shell = bot.shell("Downloading...");
@@ -109,8 +108,20 @@
bot.waitUntil(shellCloses(shell),Timing.time(projSize*20*1000));
util.waitForNonIgnoredJobs(Timing.time20S());
bot.waitForShell("New Project Example");
- bot.shell("New Project Example").bot().button(IDELabel.Button.FINISH).click();
+ bot.shell("New Project Example").bot().button(IDELabel.Button.FINISH).click();
+ //bot.sleep(Timing.time5S());
+ /* Temporary fix needed by - https://issues.jboss.org/browse/JBIDE-11781
+ * Close the Quick Fix shell/dialog - or the project explorer cannot find the
+ * webservice_producer|client projects in the project explorer - ldimaggi - May 2012 */
+ try {
+ bot.shell("Quick Fix").bot().button(IDELabel.Button.FINISH).click();
+ }
+ catch (Exception E) {
+ log.info("Condition from https://issues.jboss.org/browse/JBIDE-11781 not found " + E.getMessage());
+ }
+ //bot.sleep(Timing.time5S());
+
for (String project : getProjectNames()) {
assertTrue(String.format("Example project '%s' was not found in project explorer",project),projectExplorer.existsResource(project));
}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2012-05-14 19:58:03 UTC (rev 41006)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2012-05-14 20:00:20 UTC (rev 41007)
@@ -868,7 +868,7 @@
if (createRuntime) {
wiz.button(IDELabel.Button.ADD).click();
bot.shell(IDELabel.Shell.NEW_SERVER_RUNTIME_ENVIRONMENT).activate();
- open.selectTreeNode(runtime);
+ open.selectTreeNode(runtime);
bot.button(IDELabel.Button.NEXT).click();
for (Object key : properties.keySet()) {
bot.textWithLabel(key.toString()).setText(
@@ -884,6 +884,10 @@
if (jreToUse != null) {
bot.comboBox(0).setSelection(jreToUse);
}
+
+ /* To work around bug https://issues.jboss.org/browse/JBIDE-11567 - ldimaggi - April 2012 */
+ //bot.table(0).select("default");
+
open.finish(bot.activeShell().bot());
}
else{
12 years, 8 months
JBoss Tools SVN: r41006 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts.
by jbosstools-commits@lists.jboss.org
Author: ldimaggio
Date: 2012-05-14 15:58:03 -0400 (Mon, 14 May 2012)
New Revision: 41006
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotEditorExt.java
Log:
Updated to include:
27,28d26
< import org.jboss.tools.ui.bot.ext.parts.QuickFixBot; /* ldimaggi - April 17, 2012 */
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotEditorExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotEditorExt.java 2012-05-14 19:54:42 UTC (rev 41005)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotEditorExt.java 2012-05-14 19:58:03 UTC (rev 41006)
@@ -24,6 +24,8 @@
import org.eclipse.ui.IEditorReference;
import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.parts.QuickFixBot; /* ldimaggi - April 17, 2012 */
+
public class SWTBotEditorExt extends SWTBotEclipseEditor {
12 years, 8 months
JBoss Tools SVN: r41005 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen.
by jbosstools-commits@lists.jboss.org
Author: ldimaggio
Date: 2012-05-14 15:54:42 -0400 (Mon, 14 May 2012)
New Revision: 41005
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
Log:
Updated references to EAP6 runtimes - to remove "Experimental"
< public String getName() { return "JBoss Enterprise Application Platform 6.x";}
---
> public String getName() { return "JBoss Enterprise Application Platform 6.x (Experimental)";}
10655c10655
< public String getName() { return "JBoss Enterprise Application Platform 6.x Runtime";}
---
> public String getName() { return "JBoss Enterprise Application Platform 6.x Runtime (Experimental)";}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2012-05-14 19:46:32 UTC (rev 41004)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2012-05-14 19:54:42 UTC (rev 41005)
@@ -1860,7 +1860,7 @@
* represents item : JBoss Enterprise Middleware->JBoss Enterprise Application Platform 6.x
*/
public static final IServer LABEL = new IServer() {
- public String getName() { return "JBoss Enterprise Application Platform 6.x (Experimental)";}
+ public String getName() { return "JBoss Enterprise Application Platform 6.x";}
public List<String> getGroupPath() {
List<String> l = new Vector<String>();
l.add("JBoss Enterprise Middleware");
@@ -10652,7 +10652,7 @@
* represents item : JBoss Enterprise Middleware->JBoss Enterprise Application Platform 6.x Runtime
*/
public static final IServerRuntime LABEL = new IServerRuntime() {
- public String getName() { return "JBoss Enterprise Application Platform 6.x Runtime (Experimental)";}
+ public String getName() { return "JBoss Enterprise Application Platform 6.x Runtime";}
public List<String> getGroupPath() {
List<String> l = new Vector<String>();
l.add("JBoss Enterprise Middleware");
12 years, 8 months
JBoss Tools SVN: r41004 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-05-14 15:46:32 -0400 (Mon, 14 May 2012)
New Revision: 41004
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java
Log:
https://issues.jboss.org/browse/JBIDE-11815 Default for Configuration on New Seam Project wizard should be Seam 2.3 when JBoss AS 7 is selected as Target runtime
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java 2012-05-14 19:22:50 UTC (rev 41003)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java 2012-05-14 19:46:32 UTC (rev 41004)
@@ -76,12 +76,15 @@
seamGenBuildPath = getSeamGenBuildPath(SEAM_2_0_HOME);
seamFolder = new File(seamGenBuildPath);
if(seamFolder.exists() && seamFolder.isDirectory()) {
- SeamRuntime rt = new SeamRuntime();
- rt.setHomeDir(seamGenBuildPath);
- rt.setName("Seam " + SeamVersion.SEAM_2_1); //$NON-NLS-1$ //$NON-NLS-2$
- rt.setDefault(true);
- rt.setVersion(SeamVersion.SEAM_2_1);
- map.put(rt.getName(), rt);
+ File seamGen = new File(seamFolder, "/seam-gen");
+ if(seamGen.exists() && seamGen.isDirectory()) {
+ SeamRuntime rt = new SeamRuntime();
+ rt.setHomeDir(seamGenBuildPath);
+ rt.setName("Seam " + SeamVersion.SEAM_2_1); //$NON-NLS-1$ //$NON-NLS-2$
+ rt.setDefault(true);
+ rt.setVersion(SeamVersion.SEAM_2_1);
+ map.put(rt.getName(), rt);
+ }
}
node.put(SeamProjectPreferences.RUNTIME_LIST, new SeamRuntimeListConverter().getString(map));
try {
12 years, 8 months
JBoss Tools SVN: r41003 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-05-14 15:22:50 -0400 (Mon, 14 May 2012)
New Revision: 41003
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
Log:
JBIDE-11854
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java 2012-05-14 19:06:08 UTC (rev 41002)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java 2012-05-14 19:22:50 UTC (rev 41003)
@@ -62,6 +62,7 @@
private ChangePortDialogInfo info;
private String selected;
private XPathQuery currentQuery;
+ private XPathQuery[] allQueries;
private boolean queriesLoaded = false;
private List listWidget;
private Label currentValue;
@@ -126,9 +127,9 @@
ArrayList<String> list = new ArrayList<String>();
XPathCategory[] categories = XPathModel.getDefault().getCategories(info.server);
for( int i = 0; i < categories.length; i++ ) {
- XPathQuery[] queries = categories[i].getQueries();
- for( int j = 0; j < queries.length; j++ ) {
- list.add(categories[i].getName() + IPath.SEPARATOR + queries[j].getName());
+ allQueries = categories[i].getQueries();
+ for( int j = 0; j < allQueries.length; j++ ) {
+ list.add(categories[i].getName() + IPath.SEPARATOR + allQueries[j].getName());
}
}
String[] stuff = (String[]) list.toArray(new String[list.size()]);
@@ -186,7 +187,7 @@
throws InvocationTargetException, InterruptedException {
monitor.beginTask(Messages.ChangePortDialog_LoadingTaskName, items.length);
for( int i = 0; i < items.length; i++ ) {
- countMatches(currentQuery);
+ countMatches(allQueries[i]);
monitor.worked(1);
}
monitor.done();
@@ -228,6 +229,7 @@
if( query == null )
return String.valueOf(-1);
+ query.clearCache();
int count = 0;
XPathFileResult[] fResults = query.getResults();
for( int i = 0; i < fResults.length; i++ ) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2012-05-14 19:06:08 UTC (rev 41002)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2012-05-14 19:22:50 UTC (rev 41003)
@@ -186,7 +186,7 @@
super(parentShell);
setShellStyle(getShellStyle() | SWT.RESIZE);
this.server = server;
- repository = new XMLDocumentRepository(XMLDocumentRepository.getDefault());
+ repository = new XMLDocumentRepository(null);
if( original != null ) {
this.original = original;
this.originalName = this.name = original.getName();
12 years, 8 months