JBoss Tools SVN: r36837 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2011-12-01 12:39:27 -0500 (Thu, 01 Dec 2011)
New Revision: 36837
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
Log:
JBIDE-10303 : remove warning icon if requirements are missing
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-12-01 17:09:38 UTC (rev 36836)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-12-01 17:39:27 UTC (rev 36837)
@@ -993,18 +993,12 @@
protected void configureTutorialText(FormText tutorialText, final Tutorial tutorial) {
StringBuilder buffer = new StringBuilder();
buffer.append(JBossCentralActivator.FORM_START_TAG);
- //boolean haveImage = tutorial.getIconPath() != null && JBossCentralActivator.getDefault().getImage(tutorial.getIconPath()) != null;
- //if (haveImage) {
- // buffer.append("<img href=\"image\"/> ");
- //}
- //if (project.getUnsatisfiedFixes().size() > 0) {
buffer.append("<img href=\"image\"/> ");
- //}
buffer.append("<a href=\"link\">");
buffer.append(tutorial.getName());
buffer.append("</a> ");
-
buffer.append(JBossCentralActivator.FORM_END_TAG);
+
String text = buffer.toString();
tutorialText.setText(text , true, false);
Image image;
@@ -1017,11 +1011,9 @@
unsatisfiedFixes.add(fix);
}
}
- if (project.getUnsatisfiedFixes().size() > 0) {
- image = JBossCentralActivator.getDefault().getImage("/icons/nwarning.gif");
- } else {
- image = JBossCentralActivator.getDefault().getImage(tutorial.getIconPath());
- }
+
+ //JBIDE-10303 : never display a warning image
+ image = JBossCentralActivator.getDefault().getImage(tutorial.getIconPath());
tutorialText.setImage("image", image);
tutorialText.addHyperlinkListener(new HyperlinkAdapter() {
12 years, 5 months
JBoss Tools SVN: r36836 - trunk/common/tests/org.jboss.tools.common.verification.ui.test/src/org/jboss/tools/common/verification/ui/vrules/preferences/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-12-01 12:09:38 -0500 (Thu, 01 Dec 2011)
New Revision: 36836
Modified:
trunk/common/tests/org.jboss.tools.common.verification.ui.test/src/org/jboss/tools/common/verification/ui/vrules/preferences/test/VerificationPreferencePageTest.java
Log:
JBIDE-10190
https://issues.jboss.org/browse/JBIDE-10190
Old verification validator test removed.
Modified: trunk/common/tests/org.jboss.tools.common.verification.ui.test/src/org/jboss/tools/common/verification/ui/vrules/preferences/test/VerificationPreferencePageTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.verification.ui.test/src/org/jboss/tools/common/verification/ui/vrules/preferences/test/VerificationPreferencePageTest.java 2011-12-01 17:08:56 UTC (rev 36835)
+++ trunk/common/tests/org.jboss.tools.common.verification.ui.test/src/org/jboss/tools/common/verification/ui/vrules/preferences/test/VerificationPreferencePageTest.java 2011-12-01 17:09:38 UTC (rev 36836)
@@ -29,6 +29,8 @@
public static final String ID = "org.jboss.tools.common.verification.ui";
+ public void testDummy () {}
+
//verification removed, see JBIDE-10190
public void _testShowVerificationPreferencePage() {
12 years, 5 months
JBoss Tools SVN: r36835 - in trunk/common/tests/org.jboss.tools.common.verification.test: .settings and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-12-01 12:08:56 -0500 (Thu, 01 Dec 2011)
New Revision: 36835
Added:
trunk/common/tests/org.jboss.tools.common.verification.test/.settings/
trunk/common/tests/org.jboss.tools.common.verification.test/.settings/org.eclipse.jdt.core.prefs
Modified:
trunk/common/tests/org.jboss.tools.common.verification.test/src/org/jboss/tools/common/verification/test/VerificationTest.java
Log:
JBIDE-10190
https://issues.jboss.org/browse/JBIDE-10190
Old verification validator test removed.
Added: trunk/common/tests/org.jboss.tools.common.verification.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/tests/org.jboss.tools.common.verification.test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.verification.test/.settings/org.eclipse.jdt.core.prefs 2011-12-01 17:08:56 UTC (rev 36835)
@@ -0,0 +1,8 @@
+#Fri Sep 30 12:13:48 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Property changes on: trunk/common/tests/org.jboss.tools.common.verification.test/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/common/tests/org.jboss.tools.common.verification.test/src/org/jboss/tools/common/verification/test/VerificationTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.verification.test/src/org/jboss/tools/common/verification/test/VerificationTest.java 2011-12-01 16:03:49 UTC (rev 36834)
+++ trunk/common/tests/org.jboss.tools.common.verification.test/src/org/jboss/tools/common/verification/test/VerificationTest.java 2011-12-01 17:08:56 UTC (rev 36835)
@@ -27,6 +27,8 @@
protected void setUp() throws Exception {
}
+ public void testDummy () {}
+
//verification removed, see JBIDE-10190
public void _testVerificationModel() {
XModel model = PreferenceModelUtilities.getPreferenceModel();
12 years, 5 months
JBoss Tools SVN: r36834 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-12-01 11:03:49 -0500 (Thu, 01 Dec 2011)
New Revision: 36834
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/ActiveEditorSwitcher.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeUpdateJob.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
https://issues.jboss.org/browse/JBIDE-10016 NullPointerException in VPE when an attribute is intensively changed
proposed patch was applied
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/ActiveEditorSwitcher.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/ActiveEditorSwitcher.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/ActiveEditorSwitcher.java 2011-12-01 16:03:49 UTC (rev 36834)
@@ -0,0 +1,40 @@
+package org.jboss.tools.vpe.editor;
+
+public class ActiveEditorSwitcher {
+ public static final int ACTIVE_EDITOR_CANNOT = 0;
+ public static final int ACTIVE_EDITOR_NONE = 1;
+ public static final int ACTIVE_EDITOR_SOURCE = 2;
+ public static final int ACTIVE_EDITOR_VISUAL = 3;
+
+ private int type = ACTIVE_EDITOR_CANNOT;
+ private VpeController vpeController;
+ private VpeEditorPart editPart;
+
+ public ActiveEditorSwitcher(VpeController vpeController, VpeEditorPart editPart) {
+ this.vpeController = vpeController;
+ this.editPart = editPart;
+ }
+
+ public void initActiveEditor() {
+ type = ACTIVE_EDITOR_NONE;
+ }
+
+ public void destroyActiveEditor() {
+ type = ACTIVE_EDITOR_CANNOT;
+ }
+
+ public boolean startActiveEditor(int newType) {
+ if (type != ACTIVE_EDITOR_NONE || type == ACTIVE_EDITOR_NONE && newType == ACTIVE_EDITOR_SOURCE
+ && editPart.getVisualMode() == VpeEditorPart.SOURCE_MODE) {
+ return false;
+ } else {
+ type = newType;
+ return true;
+ }
+ }
+
+ public void stopActiveEditor() {
+ vpeController.onRefresh();
+ type = ACTIVE_EDITOR_NONE;
+ }
+}
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/ActiveEditorSwitcher.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2011-12-01 14:44:07 UTC (rev 36833)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2011-12-01 16:03:49 UTC (rev 36834)
@@ -14,6 +14,7 @@
import java.text.MessageFormat;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -41,8 +42,6 @@
import org.eclipse.swt.custom.LineStyleListener;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.MenuEvent;
import org.eclipse.swt.events.MenuListener;
import org.eclipse.swt.events.SelectionEvent;
@@ -84,7 +83,6 @@
import org.jboss.tools.common.model.event.XModelTreeEvent;
import org.jboss.tools.common.model.event.XModelTreeListener;
import org.jboss.tools.common.model.project.IModelNature;
-import org.jboss.tools.common.model.ui.dnd.ModelTransfer;
import org.jboss.tools.common.model.ui.util.ModelUtilities;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.model.util.XModelTreeListenerSWTSync;
@@ -104,7 +102,6 @@
import org.jboss.tools.vpe.dnd.VpeDnD;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
-import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
import org.jboss.tools.vpe.editor.menu.VpeMenuCreator;
import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
@@ -132,16 +129,6 @@
import org.jboss.tools.vpe.editor.util.DocTypeUtil;
import org.jboss.tools.vpe.editor.util.SelectionUtil;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
-import org.jboss.tools.vpe.editor.util.VpeDebugUtil;
-import org.jboss.tools.vpe.editor.util.VpeNodesManagingUtil;
-import org.jboss.tools.vpe.handlers.PageDesignOptionsHandler;
-import org.jboss.tools.vpe.handlers.PreferencesHandler;
-import org.jboss.tools.vpe.handlers.RefreshHandler;
-import org.jboss.tools.vpe.handlers.RotateEditorsHandler;
-import org.jboss.tools.vpe.handlers.ShowBorderHandler;
-import org.jboss.tools.vpe.handlers.ShowBundleAsELHandler;
-import org.jboss.tools.vpe.handlers.ShowNonVisualTagsHandler;
-import org.jboss.tools.vpe.handlers.ShowTextFormattingHandler;
import org.jboss.tools.vpe.handlers.VisualPartAbstractHandler;
import org.jboss.tools.vpe.messages.VpeUIMessages;
import org.jboss.tools.vpe.resref.core.AbsoluteFolderReferenceList;
@@ -164,6 +151,7 @@
import org.w3c.dom.Element;
import org.w3c.dom.Node;
+@SuppressWarnings({ "restriction", "deprecation" })
public class VpeController implements INodeAdapter,
IModelLifecycleListener, INodeSelectionListener,
ITextSelectionListener, SelectionListener,
@@ -174,7 +162,6 @@
MozillaContextMenuListener, MozillaResizeListener,
MozillaAfterPaintListener, MozillaScrollListener {
- public static final int DEFAULT_UPDATE_DELAY_TIME = 400;
private boolean visualEditorVisible = true;
private boolean synced = true;
StructuredTextEditor sourceEditor;
@@ -189,7 +176,7 @@
private VpeVisualDomBuilder visualBuilder;
private VpeDnD vpeDnD;
// private VpeVisualKeyHandler visualKeyHandler;
- private ActiveEditorSwitcher switcher = new ActiveEditorSwitcher();
+ private ActiveEditorSwitcher switcher;
private Attr lastRemovedAttr;
private String lastRemovedAttrName;
private boolean mouseUpSelectionReasonFlag;
@@ -212,7 +199,7 @@
private XModelTreeListenerSWTSync optionsListener;
// Added by Max Areshkau Fix for JBIDE-1479
private UIJob job = null;
- private UIJob uiJob;
+ private VpeUpdateJob uiJob;
// JBIDE-675, visual refresh job
private UIJob visualRefreshJob;
private UIJob reinitJob;
@@ -224,7 +211,7 @@
* Added by Max Areshkau JBIDE-675, stores information about modification
* events
*/
- private LinkedList<VpeEventBean> changeEvents;
+ private List<VpeEventBean> changeEvents;
Shell tip;
@@ -238,12 +225,10 @@
*/
private IKeyEventHandler keyEventHandler;
- // contains vpe update delau time in miliseconds
- private int vpeUpdateDelayTime;
-
public VpeController(VpeEditorPart editPart) {
this.editPart = editPart;
+ this.switcher = new ActiveEditorSwitcher(this, editPart);
dropWindow = new VpeDropWindow(editPart.getSite().getShell());
}
@@ -367,9 +352,6 @@
elReferenceListListener = ELReferenceList.getInstance();
elReferenceListListener.addChangeListener(this);
- // initialization of vpe update delay time
- vpeUpdateDelayTime = DEFAULT_UPDATE_DELAY_TIME;
-
// pageContext.fireTaglibsChanged();
// yradtsevich: we have to refresh VPE selection on init (fix of
@@ -527,99 +509,13 @@
display = PlatformUI.getWorkbench().getDisplay();
if (display != null && (Thread.currentThread() == display.getThread())) {
- getChangeEvents().addLast(
- new VpeEventBean(notifier, eventType, feature, oldValue,
- newValue, pos));
+ getChangeEvents().add(new VpeEventBean(notifier, eventType, feature, oldValue, newValue, pos));
if (uiJob == null) {
- uiJob = new UIJob(VpeUIMessages.VPE_UPDATE_JOB_TITLE) {
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- monitor.beginTask(VpeUIMessages.VPE_UPDATE_JOB_TITLE,
- 100);
- while (getChangeEvents().size() > 0) {
- monitor.worked((int) (100 / getChangeEvents()
- .size()));
- VpeEventBean eventBean = getChangeEvents()
- .getFirst();
- if (monitor.isCanceled()) {
- /*
- * Yahor Radtsevich: the following line is
- * commented as fix of JBIDE-3758: VPE
- * autorefresh is broken in some cases. Now if
- * the change events queue should be cleared,
- * the user have to do it explicitly.
- */
- // getChangeEvents().clear();
-
- return Status.CANCEL_STATUS;
- }
- try {
- notifyChangedInUiThread(
- eventBean.getNotifier(), eventBean
- .getEventType(), eventBean
- .getFeature(), eventBean
- .getOldValue(), eventBean
- .getNewValue(), eventBean
- .getPos());
- } catch (VpeDisposeException ex) {
- // JBIDE-675 we will get this exception if user
- // close editor,
- // when update visual editor job is running, we
- // shoud ignore this
- // exception
- break;
- } catch (NullPointerException ex) {
- if (switcher != null) {
- throw ex;
- } else {
- // class was disposed and exception result
- // of that we can't stop
- // refresh job in time, so we just ignore
- // this exception
- }
- } catch(RuntimeException ex) {
- VpePlugin.getPluginLog().logError(ex);
- }
- getChangeEvents().remove(eventBean);
- }
- // cause is to lock calls others events
- if (switcher != null
- && switcher
- .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE))
- try {
- sourceSelectionChanged();
- /*
- * https://jira.jboss.org/jira/browse/JBIDE-3619
- * VpeViewUpdateJob takes place after toolbar
- * selection have been updated. New nodes
- * haven't been put into dom mapping thus
- * toolbar becomes desabled. Updating toolbar
- * state here takes into account updated vpe
- * nodes.
- */
- if (toolbarFormatControllerManager != null) {
- toolbarFormatControllerManager
- .selectionChanged();
- }
- } finally {
- switcher.stopActiveEditor();
- }
- monitor.done();
- return Status.OK_STATUS;
- }
- };
- }
-
- if (uiJob.getState() != Job.RUNNING) {
+ uiJob = new VpeUpdateJob(this, switcher);
uiJob.setPriority(Job.LONG);
- // Fix of JBIDE-1900
- uiJob.schedule(getVpeUpdateDelayTime());
- } else {
- uiJob.cancel();
- uiJob.schedule(getVpeUpdateDelayTime());
- setVpeUpdateDelayTime(400);
}
-
+ uiJob.interrupt();
+ uiJob.execute();
return;
}
// start job when we modify file in non ui thread
@@ -644,6 +540,11 @@
job.schedule(1000L);
}
+ public void notifyChangedInUiThread(VpeEventBean eventBean) {
+ notifyChangedInUiThread(eventBean.getNotifier(), eventBean.getEventType(), eventBean.getFeature(),
+ eventBean.getOldValue(), eventBean.getNewValue(), eventBean.getPos());
+ }
+
public void notifyChangedInUiThread(INodeNotifier notifier, int eventType,
Object feature, Object oldValue, Object newValue, int pos) {
if (switcher == null
@@ -660,6 +561,7 @@
return;
}
// visualBuilder.rebuildFlag = false;
+ boolean rebuildWholeDocumentFlag = false;
switch (eventType) {
case INodeNotifier.CHANGE:
sourceChangeFlag = true;
@@ -672,12 +574,13 @@
boolean update = visualBuilder.setText((Node) notifier);
visualEditor.showResizer();
// Added by Max Areshkau JBIDE-1554
- if (!update)
- visualBuilder.updateNode((Node) notifier);
+ if (!update) {
+ rebuildWholeDocumentFlag = visualBuilder.updateNode((Node) notifier);
+ }
} else if (type == Node.COMMENT_NODE) {
if ("yes".equals(VpePreference.SHOW_COMMENTS.getValue())) { //$NON-NLS-1$
visualBuilder.clearSelectionRectangle();
- visualBuilder.updateNode((Node) notifier);
+ rebuildWholeDocumentFlag = visualBuilder.updateNode((Node) notifier);
}
} else if (feature != null
&& ((Node) feature).getNodeType() == Node.ATTRIBUTE_NODE) {
@@ -686,7 +589,7 @@
if ((Attr) feature == lastRemovedAttr
&& !attrName.equals(lastRemovedAttrName)) {
lastRemovedAttr = null;
- visualBuilder.removeAttribute((Element) notifier,
+ rebuildWholeDocumentFlag = visualBuilder.removeAttribute((Element) notifier,
lastRemovedAttrName);
}
visualBuilder.setAttribute((Element) notifier,
@@ -694,7 +597,7 @@
} else {
lastRemovedAttr = (Attr) feature;
lastRemovedAttrName = ((Attr) feature).getName();
- visualBuilder.removeAttribute((Element) notifier,
+ rebuildWholeDocumentFlag = visualBuilder.removeAttribute((Element) notifier,
lastRemovedAttrName);
}
}
@@ -726,7 +629,7 @@
*/
if (Node.COMMENT_NODE == ((Node) feature).getNodeType()) {
commentRemoveCount++;
- visualBuilder.updateNode((Node) feature);
+ rebuildWholeDocumentFlag = visualBuilder.updateNode((Node) feature);
commentNodeChanged = true;
} else {
commentRemoveCount--;
@@ -748,7 +651,7 @@
if (!commentNodeChanged ||(commentNodeChanged && (commentAddCount != 1 || commentRemoveCount != 1))) {
visualEditor.hideResizer();
visualBuilder.clearSelectionRectangle();
- visualBuilder.updateNode((Node) notifier);
+ rebuildWholeDocumentFlag = visualBuilder.updateNode((Node) notifier);
} else {
commentNodeChanged = false;
}
@@ -774,6 +677,10 @@
}
break;
}
+ if (rebuildWholeDocumentFlag) {
+ // whole document rebuild occur -> so cleanup change events queue
+ getChangeEvents().clear();
+ }
} finally {
// fix for jbide-675, swithcer is null when vpecontroller is
// disposed
@@ -1277,11 +1184,11 @@
public void keyPress(nsIDOMKeyEvent keyEvent) {
if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
System.out.println("<<< keyPress type: " + keyEvent.getType() + //$NON-NLS-1$
- " Ctrl: "
+ " Ctrl: " //$NON-NLS-1$
+ keyEvent.getCtrlKey()
- + " Shift: " + keyEvent.getShiftKey() + //$NON-NLS-1$ //$NON-NLS-2$
- " CharCode: " + keyEvent.getCharCode()
- + " KeyCode: " + keyEvent.getKeyCode()); //$NON-NLS-1$ //$NON-NLS-2$
+ + " Shift: " + keyEvent.getShiftKey() + //$NON-NLS-1$
+ " CharCode: " + keyEvent.getCharCode() //$NON-NLS-1$
+ + " KeyCode: " + keyEvent.getKeyCode()); //$NON-NLS-1$
}
if (!switcher
.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
@@ -1293,7 +1200,6 @@
} finally {
switcher.stopActiveEditor();
}
- setVpeUpdateDelayTime(0);
/*
* adding calls of core event handlers, for example' CTR+H' or 'CTRL+M'
* event handler dialog
@@ -1591,38 +1497,6 @@
System.out.println();
}
- public class ActiveEditorSwitcher {
- public static final int ACTIVE_EDITOR_CANNOT = 0;
- public static final int ACTIVE_EDITOR_NONE = 1;
- public static final int ACTIVE_EDITOR_SOURCE = 2;
- public static final int ACTIVE_EDITOR_VISUAL = 3;
-
- private int type = ACTIVE_EDITOR_CANNOT;
-
- private void initActiveEditor() {
- type = ACTIVE_EDITOR_NONE;
- }
-
- private void destroyActiveEditor() {
- type = ACTIVE_EDITOR_CANNOT;
- }
-
- public boolean startActiveEditor(int newType) {
- if (type != ACTIVE_EDITOR_NONE || type == ACTIVE_EDITOR_NONE && newType == ACTIVE_EDITOR_SOURCE
- && editPart.getVisualMode() == VpeEditorPart.SOURCE_MODE) {
- return false;
- } else {
- type = newType;
- return true;
- }
- }
-
- public void stopActiveEditor() {
- onRefresh();
- type = ACTIVE_EDITOR_NONE;
- }
- }
-
void refreshTemplates() {
if (includeList.includesRefresh()) {
visualRefresh();
@@ -2061,11 +1935,9 @@
/**
* @return the changeEvents
*/
- public LinkedList<VpeEventBean> getChangeEvents() {
-
+ public List<VpeEventBean> getChangeEvents() {
if (changeEvents == null) {
-
- changeEvents = new LinkedList<VpeEventBean>();
+ changeEvents = Collections.synchronizedList(new LinkedList<VpeEventBean>());
}
return changeEvents;
}
@@ -2081,6 +1953,7 @@
if (monitor.isCanceled()) {
return Status.CANCEL_STATUS;
}
+ getChangeEvents().clear();
reinitImpl();
return Status.OK_STATUS;
}
@@ -2088,7 +1961,7 @@
reinitJob.schedule();
}
- private void reinitImpl() {
+ void reinitImpl() {
try {
if (switcher == null
|| !switcher
@@ -2196,21 +2069,6 @@
}
/**
- * @return the vpeUpdateDelayTime
- */
- private int getVpeUpdateDelayTime() {
- return vpeUpdateDelayTime;
- }
-
- /**
- * @param vpeUpdateDelayTime
- * the vpeUpdateDelayTime to set
- */
- private void setVpeUpdateDelayTime(int vpeUpdateDelayTime) {
- this.vpeUpdateDelayTime = vpeUpdateDelayTime;
- }
-
- /**
* @return the selectionManager
*/
public ISelectionManager getSelectionManager() {
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeUpdateJob.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeUpdateJob.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeUpdateJob.java 2011-12-01 16:03:49 UTC (rev 36834)
@@ -0,0 +1,113 @@
+package org.jboss.tools.vpe.editor;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.progress.UIJob;
+import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.editor.toolbar.format.FormatControllerManager;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+
+public class VpeUpdateJob extends UIJob {
+
+ protected boolean execState = false;
+
+ protected VpeController vpeController;
+ protected ActiveEditorSwitcher switcher;
+
+ public VpeUpdateJob(VpeController vpeController, ActiveEditorSwitcher switcher) {
+ super(VpeUIMessages.VPE_UPDATE_JOB_TITLE);
+ this.vpeController = vpeController;
+ this.switcher = switcher;
+ }
+
+ protected synchronized void setExecState(boolean execState) {
+ this.execState = execState;
+ }
+
+ protected synchronized boolean isExecState() {
+ return execState;
+ }
+
+ public void interrupt() {
+ setExecState(false);
+ }
+
+ public void execute() {
+ setExecState(true);
+ schedule();
+ }
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ IStatus res = Status.OK_STATUS;
+ final int totalWork = 10000;
+ final int maxQueue4WholeRefresh = 30;
+ monitor.beginTask(VpeUIMessages.VPE_UPDATE_JOB_TITLE, totalWork);
+ final List<VpeEventBean> changeEvents = vpeController.getChangeEvents();
+ while (changeEvents.size() > 0) {
+ if (!isExecState()) {
+ break;
+ }
+ if (changeEvents.size() > maxQueue4WholeRefresh) {
+ changeEvents.clear();
+ monitor.worked((int) (totalWork / 2));
+ vpeController.reinitImpl();
+ monitor.worked(totalWork);
+ break;
+ }
+ monitor.worked((int) (totalWork / changeEvents.size()));
+ VpeEventBean eventBean = changeEvents.remove(0);
+ if (monitor.isCanceled()) {
+ // Yahor Radtsevich: the following line is commented as fix of JBIDE-3758: VPE autorefresh is broken in
+ // some cases. Now if the change events queue should be cleared, the user have to do it explicitly.
+ // getChangeEvents().clear();
+ res = Status.CANCEL_STATUS;
+ break;
+ }
+ try {
+ vpeController.notifyChangedInUiThread(eventBean);
+ } catch (VpeDisposeException ex) {
+ // JBIDE-675 we will get this exception if user
+ // close editor,
+ // when update visual editor job is running, we
+ // shoud ignore this
+ // exception
+ break;
+ } catch (NullPointerException ex) {
+ if (switcher != null) {
+ throw ex;
+ } else {
+ // class was disposed and exception result
+ // of that we can't stop
+ // refresh job in time, so we just ignore
+ // this exception
+ }
+ } catch (RuntimeException ex) {
+ VpePlugin.getPluginLog().logError(ex);
+ }
+ }
+ if (isExecState() && res == Status.OK_STATUS) {
+ // cause is to lock calls others events
+ if (switcher != null && switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
+ try {
+ vpeController.sourceSelectionChanged();
+ // https://jira.jboss.org/jira/browse/JBIDE-3619 VpeViewUpdateJob takes place after toolbar selection
+ // have been updated. New nodes haven't been put into dom mapping thus toolbar becomes desabled.
+ // Updating toolbar state here takes into account updated vpe nodes.
+ final FormatControllerManager tfcm = vpeController.getToolbarFormatControllerManager();
+ if (tfcm != null) {
+ tfcm.selectionChanged();
+ }
+ } finally {
+ switcher.stopActiveEditor();
+ }
+ }
+ }
+ monitor.done();
+ return res;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeUpdateJob.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2011-12-01 14:44:07 UTC (rev 36833)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2011-12-01 16:03:49 UTC (rev 36834)
@@ -79,6 +79,7 @@
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+@SuppressWarnings("restriction")
public class VpeVisualDomBuilder extends VpeDomBuilder {
public static final String VPE_USER_TOGGLE_ID = "vpe-user-toggle-id"; //$NON-NLS-1$
public static final String VPE_USER_TOGGLE_LOOKUP_PARENT = "vpe-user-toggle-lookup-parent"; //$NON-NLS-1$
@@ -765,21 +766,26 @@
// ==========================================================
- public void updateNode(Node sourceNode) {
+ // return true in case if rebuild whole document occur
+ public boolean updateNode(Node sourceNode) {
+ boolean res = false;
if (sourceNode == null) {
- return;
+ return res;
}
switch (sourceNode.getNodeType()) {
case Node.DOCUMENT_NODE:
rebuildDom((Document) sourceNode);
+ res = true;
break;
default:
- updateElement(sourceNode);
+ res = updateElement(sourceNode);
}
+ return res;
}
- private void updateElement(Node sourceNode) {
+ // return true in case if rebuild whole document occur
+ private boolean updateElement(Node sourceNode) {
VpeElementMapping elementMapping = null;
VpeNodeMapping nodeMapping = domMapping.getNodeMapping(sourceNode);
if (nodeMapping instanceof VpeElementMapping) {
@@ -793,7 +799,7 @@
*/
if (HTML.TAG_STYLE.equalsIgnoreCase(sourceNode.getNodeName())) {
VpeStyleUtil.refreshStyleElement(this, elementMapping);
- return;
+ return false;
}
Node updateNode = elementMapping.getTemplate()
.getNodeForUpdate(pageContext,
@@ -801,11 +807,11 @@
elementMapping.getVisualNode(),
elementMapping.getData());
if ((updateNode != null) && (updateNode != sourceNode)) {
- updateNode(updateNode);
- return;
+ return updateNode(updateNode);
}
}
}
+ boolean res = false;
/*
* 1) Remove source node from mappings and lists.
*/
@@ -832,11 +838,12 @@
// node?
// looks like we haven't need do it.
if (sourceNode.getNodeType() == Node.TEXT_NODE) {
- updateNode(sourceNode.getParentNode());
- }else if(HTML.TAG_LINK.equalsIgnoreCase(sourceNode.getNodeName())) {
+ res = updateNode(sourceNode.getParentNode());
+ } else if(HTML.TAG_LINK.equalsIgnoreCase(sourceNode.getNodeName())) {
addNode(sourceNode, null, getHeadNode());
}
}
+ return res;
}
public void removeNode(Node sourceNode) {
@@ -891,16 +898,19 @@
return false;
}
- public void setAttribute(Element sourceElement, String name, String value) {
+ // return true in case if rebuild whole document occur
+ public boolean setAttribute(Element sourceElement, String name, String value) {
VpeElementMapping elementMapping = (VpeElementMapping) domMapping
.getNodeMapping(sourceElement);
/*
* https://jira.jboss.org/jira/browse/JBIDE-4110
* Update any template automatically on attribute adding.
*/
+ boolean res = false;
if (elementMapping != null) {
- updateElement(sourceElement);
+ res = updateElement(sourceElement);
}
+ return res;
}
public void stopToggle(Node sourceNode) {
@@ -1023,16 +1033,19 @@
return null;
}
- public void removeAttribute(Element sourceElement, String name) {
+ // return true in case if rebuild whole document occur
+ public boolean removeAttribute(Element sourceElement, String name) {
VpeElementMapping elementMapping = (VpeElementMapping) domMapping
.getNodeMapping(sourceElement);
/*
* https://jira.jboss.org/jira/browse/JBIDE-4110
* Update any template automatically on attribute deleting.
*/
+ boolean res = false;
if (elementMapping != null) {
- updateElement(sourceElement);
+ res = updateElement(sourceElement);
}
+ return res;
}
public void refreshBundleValues(Element sourceElement) {
12 years, 5 months
JBoss Tools SVN: r36833 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/v7/management and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-12-01 09:44:07 -0500 (Thu, 01 Dec 2011)
New Revision: 36833
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7Server.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/v7/management/AS7ManagementDetails.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
JBIDE-10298
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7Server.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7Server.java 2011-12-01 13:50:44 UTC (rev 36832)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7Server.java 2011-12-01 14:44:07 UTC (rev 36833)
@@ -33,6 +33,8 @@
setAttribute(DEPLOY_DIRECTORY_TYPE, DEPLOY_SERVER);
setAttribute(IJBossToolingConstants.WEB_PORT_DETECT, true);
setAttribute(IJBossToolingConstants.WEB_PORT, IJBossToolingConstants.JBOSS_WEB_DEFAULT_PORT);
+ setUsername(null);
+ setPassword(null);
// In an emergency, we can switch pollers for EAP
if( isEAP(getServer()))
setAttribute(IJBossToolingConstants.STARTUP_POLLER_KEY, WebPortPoller.WEB_POLLER_ID);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/v7/management/AS7ManagementDetails.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/v7/management/AS7ManagementDetails.java 2011-12-01 13:50:44 UTC (rev 36832)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/v7/management/AS7ManagementDetails.java 2011-12-01 14:44:07 UTC (rev 36833)
@@ -17,8 +17,10 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.server.IServerProvider;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.server.internal.v7.JBoss7Server;
import org.jboss.ide.eclipse.as.core.util.PollThreadUtils;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
public class AS7ManagementDetails implements IServerProvider {
private IServer server;
@@ -48,6 +50,14 @@
public String[] handleCallbacks(String[] prompts) throws UnsupportedOperationException {
ArrayList<String> requiredProperties = new ArrayList<String>();
requiredProperties.addAll(Arrays.asList(prompts));
+ JBossServer jbs = ServerConverter.getJBossServer(server);
+ boolean emptyCreds =
+ (jbs.getUsername() == null || jbs.getUsername().equals("")) //$NON-NLS-1$
+ && (jbs.getPassword() == null || jbs.getPassword().equals("")); //$NON-NLS-1$
+ if( !emptyCreds ) {
+ return new String[]{jbs.getUsername(), jbs.getPassword()};
+ }
+
Properties props = PollThreadUtils.requestCredentialsSynchronous(this, requiredProperties);
if( props == null )
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2011-12-01 13:50:44 UTC (rev 36832)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2011-12-01 14:44:07 UTC (rev 36833)
@@ -41,8 +41,8 @@
swf_Explanation=A JBoss Server manages starting and stopping instances of JBoss. \nIt manages command line arguments and keeps track of which modules have been deployed.
swf_Explanation2=If the runtime information below is incorrect, please press back, Installed Runtimes..., \nand then Add to create a new runtime from a different location.
swf_ConfigurationLocation=Configuration Location
-swf_AuthorizationDescription=Set the JMX login and password for your server.\nThis is used by all JMX commands, and during server shutdown.
-swf_AuthenticationGroup=JMX Login Credentials
+swf_AuthorizationDescription=Set the management login and password for your server.\nThis is used by all management commands, and during server shutdown.
+swf_AuthenticationGroup=Management Login Credentials
swf_Username=User Name
swf_Password=Password
swf_BaseName=JBoss _VERSION_ Server
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2011-12-01 13:50:44 UTC (rev 36832)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2011-12-01 14:44:07 UTC (rev 36833)
@@ -180,7 +180,7 @@
id="org.jboss.ide.eclipse.as.ui.editor.passwordSection"
insertionId="org.eclipse.wst.server.editor.overview.left"
order="10"
- typeIds="%ServerTypesJBoss6OrLower"/>
+ typeIds="%AllJBossServerTypes"/>
<section
class="org.jboss.ide.eclipse.as.ui.editor.ServerModeSection"
id="org.jboss.ide.eclipse.as.ui.editor.serverModeSection"
12 years, 5 months
JBoss Tools SVN: r36832 - trunk/central/features/org.jboss.tools.central.feature.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2011-12-01 08:50:44 -0500 (Thu, 01 Dec 2011)
New Revision: 36832
Modified:
trunk/central/features/org.jboss.tools.central.feature/feature.properties
Log:
JBIDE-10071 added description to feature.xml
Modified: trunk/central/features/org.jboss.tools.central.feature/feature.properties
===================================================================
--- trunk/central/features/org.jboss.tools.central.feature/feature.properties 2011-12-01 12:30:26 UTC (rev 36831)
+++ trunk/central/features/org.jboss.tools.central.feature/feature.properties 2011-12-01 13:50:44 UTC (rev 36832)
@@ -24,7 +24,7 @@
updateSiteName=JBossTools Update Site
# "description" property - description of the feature
-description=JBoss Central
+description=JBoss Central provides a central hub for new and experienced users to get access to quickstarts, projects, documentation resources, news blogs and access to easy installation of recommended additonal plugins.
# "copyright" property - text of the "Feature Update Copyright"
copyright=Copyright (c) 2011 Red Hat, Inc. and others.\nAll rights reserved. This program and the accompanying materials\n
12 years, 5 months
JBoss Tools SVN: r36831 - trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-12-01 07:30:26 -0500 (Thu, 01 Dec 2011)
New Revision: 36831
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/DownloadRuntimeDialog.java
Log:
JBIDE-10282 Application Server download from within the JBoss Runtime Detection preferences errors on installation without any information on why -> when the folder being installed to isn't writable by the current OS user
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/DownloadRuntimeDialog.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/DownloadRuntimeDialog.java 2011-12-01 10:45:07 UTC (rev 36830)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/DownloadRuntimeDialog.java 2011-12-01 12:30:26 UTC (rev 36831)
@@ -28,7 +28,11 @@
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.PathEditor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -60,6 +64,8 @@
*/
public class DownloadRuntimeDialog extends Dialog {
+ private static final String FOLDER_IS_REQUIRED = "This folder is required";
+ private static final String FOLDER_IS_NOT_WRITABLE = "This folder does not exist or is not writable";
private static final String DELETE_ON_EXIT = "deleteOnExit";
private static final String JAVA_IO_TMPDIR = "java.io.tmpdir";
private static final String USER_HOME = "user.home";
@@ -71,6 +77,10 @@
private Text pathText;
private DownloadRuntime downloadRuntime;
private String delete;
+ private ControlDecoration decPathError;
+ private ControlDecoration decPathReq;
+ private ControlDecoration destinationPathError;
+ private ControlDecoration destinationPathReq;
public DownloadRuntimeDialog(Shell parentShell, DownloadRuntime downloadRuntime) {
super(parentShell);
@@ -105,11 +115,10 @@
pathText = new Text(pathComposite, SWT.BORDER);
gd = new GridData(SWT.FILL, SWT.FILL, true, false);
pathText.setLayoutData(gd);
- String defaultPath = dialogSettings.get(DEFAULT_DIALOG_PATH);
- if (defaultPath == null || defaultPath.isEmpty()) {
- defaultPath=System.getProperty(USER_HOME);
- }
+ final String defaultPath = getDefaultPath();
pathText.setText(defaultPath);
+ decPathError = addDecoration(pathText, FieldDecorationRegistry.DEC_ERROR, FOLDER_IS_NOT_WRITABLE);
+ decPathReq = addDecoration(pathText, FieldDecorationRegistry.DEC_REQUIRED, FOLDER_IS_REQUIRED);
pathText.addModifyListener(new ModifyListener() {
@Override
@@ -143,11 +152,13 @@
gd = new GridData(SWT.FILL, SWT.FILL, true, false);
destinationPathText.setLayoutData(gd);
String destinationPath = dialogSettings.get(DEFAULT_DESTINATION_PATH);
+ destinationPathError = addDecoration(destinationPathText, FieldDecorationRegistry.DEC_ERROR, FOLDER_IS_NOT_WRITABLE);
+ destinationPathReq = addDecoration(destinationPathText, FieldDecorationRegistry.DEC_REQUIRED, FOLDER_IS_REQUIRED);
+
if (destinationPath == null || destinationPath.isEmpty()) {
destinationPath=System.getProperty(JAVA_IO_TMPDIR);
}
destinationPathText.setText(destinationPath);
-
Button browseDestinationButton = new Button(pathComposite, SWT.NONE);
browseDestinationButton.setText("Browse...");
browseDestinationButton.addSelectionListener(new SelectionAdapter() {
@@ -194,6 +205,67 @@
return area;
}
+ private String getDefaultPath() {
+ String defaultPath = dialogSettings.get(DEFAULT_DIALOG_PATH);
+ if (defaultPath == null || defaultPath.isEmpty()) {
+ defaultPath=System.getProperty(USER_HOME);
+ }
+ return defaultPath;
+ }
+
+ private void showDecorations() {
+ String path = pathText.getText();
+ String destination = destinationPathText.getText();
+ decPathError.hide();
+ decPathReq.hide();
+ destinationPathError.hide();
+ destinationPathReq.hide();
+ if (path.isEmpty()) {
+ decPathReq.show();
+ }
+ if (destination.isEmpty()) {
+ destinationPathReq.show();
+ }
+ boolean pathExists = checkPath(path, decPathError);
+ boolean destExists = checkPath(destination, destinationPathError);
+ getButton(IDialogConstants.OK_ID).setEnabled(pathExists
+ && destExists
+ && !path.isEmpty() && !destination.isEmpty());
+ decPathError.setShowHover(true);
+ }
+
+ private boolean checkPath(String path, ControlDecoration dec) {
+ if (path.isEmpty()) {
+ return true;
+ }
+ try {
+ File file = File.createTempFile("temp", "txt", new File(path));
+ file.deleteOnExit();
+ file.delete();
+ } catch (IOException e) {
+ dec.show();
+ return false;
+ }
+ return true;
+ }
+
+ protected ControlDecoration addDecoration(Control control, String id, String description) {
+ final ControlDecoration decPath = new ControlDecoration(control, SWT.TOP
+ | SWT.LEFT);
+ FieldDecorationRegistry registry = FieldDecorationRegistry.getDefault();
+ FieldDecoration fd = registry.getFieldDecoration(id);
+ decPath.setImage(fd.getImage());
+ fd.setDescription(description);
+
+ decPath.setImage(FieldDecorationRegistry.getDefault().getFieldDecoration(
+ id).getImage());
+
+ decPath.setShowOnlyOnFocus(false);
+ decPath.setShowHover(true);
+ decPath.setDescriptionText(description);
+ return decPath;
+ }
+
protected void validate() {
getButton(IDialogConstants.OK_ID).setEnabled(true);
if (pathText.getText().isEmpty()) {
@@ -202,6 +274,7 @@
if (destinationPathText.getText().isEmpty()) {
getButton(IDialogConstants.OK_ID).setEnabled(false);
}
+ showDecorations();
}
@Override
@@ -361,4 +434,10 @@
}
}
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ super.createButtonsForButtonBar(parent);
+ showDecorations();
+ }
+
}
12 years, 5 months
JBoss Tools SVN: r36830 - trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2011-12-01 05:45:07 -0500 (Thu, 01 Dec 2011)
New Revision: 36830
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/READ_ME.TXT
Log:
created
Added: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/READ_ME.TXT
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/READ_ME.TXT (rev 0)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/READ_ME.TXT 2011-12-01 10:45:07 UTC (rev 36830)
@@ -0,0 +1,2 @@
+When checkouting the project for the first time, run prepare_workspace launcher
+that will prompt you for runtime locations and generates the test config files.
\ No newline at end of file
12 years, 5 months
JBoss Tools SVN: r36829 - trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2011-12-01 05:42:58 -0500 (Thu, 01 Dec 2011)
New Revision: 36829
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/
Log:
ignoring generated files
Property changes on: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources
___________________________________________________________________
Added: svn:ignore
+ generated_config_files
12 years, 5 months
JBoss Tools SVN: r36828 - trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2011-12-01 05:36:04 -0500 (Thu, 01 Dec 2011)
New Revision: 36828
Removed:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/epp-4.3.properties
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/epp-5.1.1.properties
Log:
these configs will be generated
Deleted: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/epp-4.3.properties
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/epp-4.3.properties 2011-12-01 10:31:58 UTC (rev 36827)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/epp-4.3.properties 2011-12-01 10:36:04 UTC (rev 36828)
@@ -1,3 +0,0 @@
-SERVER=EPP,4.3,default,/home/ljelinko/programs/jboss/EPP/jboss-epp-4.3/jboss-as
-SEAM=2.2,/home/ljelinko/programs/jboss/EPP/jboss-epp-4.3/seam2
-DB=hsqldb18,internal, , , , ,
\ No newline at end of file
Deleted: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/epp-5.1.1.properties
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/epp-5.1.1.properties 2011-12-01 10:31:58 UTC (rev 36827)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/resources/epp-5.1.1.properties 2011-12-01 10:36:04 UTC (rev 36828)
@@ -1,3 +0,0 @@
-SERVER=EPP,5.1.1,default,/home/ljelinko/programs/jboss/EPP/jboss-epp-5.1.1/jboss-as
-SEAM=2.2,/home/ljelinko/programs/jboss/EPP/jboss-epp-5.1.1/seam
-DB=hsqldb18,internal, , , , ,
\ No newline at end of file
12 years, 5 months