JBoss Tools SVN: r34145 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-08-22 13:23:20 -0400 (Mon, 22 Aug 2011)
New Revision: 34145
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
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
Log:
code cleanup, removed check for null. all references are updated.
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-08-22 17:00:15 UTC (rev 34144)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2011-08-22 17:23:20 UTC (rev 34145)
@@ -662,7 +662,7 @@
sourceChangeFlag = true;
int type = ((Node) notifier).getNodeType();
visualEditor.hideResizer();
- visualBuilder.setSelectionRectangle(SelectionManager.EMPTY_SELECTION);
+ visualBuilder.clearSelectionRectangle();
if (type == Node.CDATA_SECTION_NODE) {
visualBuilder.setCdataText((Node) notifier);
} else if (type == Node.TEXT_NODE) {
@@ -673,7 +673,7 @@
visualBuilder.updateNode((Node) notifier);
} else if (type == Node.COMMENT_NODE) {
if ("yes".equals(VpePreference.SHOW_COMMENTS.getValue())) { //$NON-NLS-1$
- visualBuilder.setSelectionRectangle(null);
+ visualBuilder.clearSelectionRectangle();
visualBuilder.updateNode((Node) notifier);
}
} else if (feature != null
@@ -744,7 +744,7 @@
*/
if (!commentNodeChanged ||(commentNodeChanged && (commentAddCount != 1 || commentRemoveCount != 1))) {
visualEditor.hideResizer();
- visualBuilder.setSelectionRectangle(null);
+ visualBuilder.clearSelectionRectangle();
visualBuilder.updateNode((Node) notifier);
} else {
commentNodeChanged = false;
@@ -761,7 +761,7 @@
// "style"))
// {
visualEditor.hideResizer();
- visualBuilder.setSelectionRectangle(null);
+ visualBuilder.clearSelectionRectangle();
visualBuilder.setText((Node) feature);
visualEditor.showResizer();
// }
@@ -1173,50 +1173,9 @@
return;
}
try {
- // mouseDownSelectionFlag = false;
- // VpeTemplate template = TemplateManagingUtil
- // .getTemplateByVisualSelection(pageContext, VisualDomUtil
- // .getTargetNode(mouseEvent));
- // if (template instanceof ITemplateSelectionManager) {
- // ((ITemplateSelectionManager) template).setSelectionByMouse(
- // pageContext, visualSelectionController, mouseEvent);
- // mouseDownSelectionFlag = true;
- // } else {
- // nsIDOMElement visualDragElement = selectionBuilder
- // .getDragElement(mouseEvent);
if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
- System.out.println("<<< mouseDown targetNode: " //$NON-NLS-1$
- /*
- * +visualNode. getNodeName() + " (" + visualNode +
- * ") selectedElement: " +( visualDragElement != null ?
- * visualDragElement . getNodeName() + " (" +
- * visualDragElement + ")" : null)
- */);
+ System.out.println("<<< mouseDown targetNode:"); //$NON-NLS-1$
}
- //
- // if (visualDragElement != null) {
- //
- // // we shouldn't change selection when we click on <input
- // // type="text" /> element,
- // // because if we change after resizing the input element
- // // lost
- // // selection
- // // if(!(HTML.TAG_INPUT.equalsIgnoreCase(visualDragElement.
- // // getNodeName())&&
- // // HTML.ATTR_TEXT.equalsIgnoreCase(visualDragElement.
- // // getAttribute(HTML.ATTR_TYPE))
- // // &&visualDragElement.getAttribute(HTML.ATTR_TYPE)!=null))
- // // {
- //
- // selectionBuilder
- // .setVisualElementSelection(visualDragElement);
- // mouseDownSelectionFlag = true;
- // // }
- // } else {
- // selectionBuilder.setCaretAtMouse(mouseEvent);
- // }
- // }
-
// selection will be set only if press left button
if (mouseEvent.getButton() == LEFT_BUTTON) {
// drag gesture isn't generated in XR 1.9 for Linux Platforms,
@@ -1310,13 +1269,6 @@
public void mouseMove(nsIDOMMouseEvent mouseEvent) {
onRefresh();
-// nsIDOMNode visualNode = VisualDomUtil.getTargetNode(mouseEvent);
-// if (visualNode != null) {
-// if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
-// System.out.println("<<< mouseMove visualNode: "
-// + visualNode.getNodeName() + " (" + visualNode + ")");
-// }
-// }
}
public void keyPress(nsIDOMKeyEvent keyEvent) {
@@ -1395,12 +1347,12 @@
* fixing JBIDE-2562 I found that eclipse handles key shortcuts without
* this notification.
*/
- // getXulRunnerEditor().getBrowser().notifyListeners(
- // keyboardEvent.type, keyboardEvent);
+ /* getXulRunnerEditor().getBrowser().notifyListeners(
+ keyboardEvent.type, keyboardEvent); */
/*
- * Fixes https://jira.jboss.org/jira/browse/JBIDE-2562 author:
- * dmaliarevich
+ * Fixes https://jira.jboss.org/jira/browse/JBIDE-2562
+ * author: dmaliarevich
*
* When shortcut key is pressed do not handle this event in the handler.
*/
@@ -1418,26 +1370,8 @@
}
}
if (keyEventHandler.handleKeyPress(keyEvent)) {
- /*
- * JBIDE-2670
- */
+ /* JBIDE-2670 */
keyEvent.preventDefault();
- // switcher
- // .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL);
- // try {
- /*
- * Edward
- */
- // commented by sdzmitrovich because cursor disappear after
- // trying to edit of read-only elements
- // TODO check editing and if are appear errors then
- // uncommented next code
- // sourceSelectionChanged(true);
- // visualSelectionController.setCaretEnabled(true);
-
- // } finally {
- // switcher.stopActiveEditor();
- // }
}
}
onRefresh();
@@ -1486,10 +1420,6 @@
*/
public void onShowContextMenu(long contextFlags, nsIDOMEvent event,
nsIDOMNode node) {
- // FIXED FOR JBIDE-3072 by sdzmitrovich
-
- // nsIDOMNode visualNode = VisualDomUtil.getTargetNode(event);
- // if (visualNode != null) {
Node selectedSourceNode = null;
VpeNodeMapping nodeMapping = SelectionUtil
@@ -1516,12 +1446,6 @@
}
});
- // create context menu
- // MenuCreationHelper menuCreationHelper =
- // new MenuCreationHelper(domMapping, pageContext, sourceEditor,
- // visualEditor);
- // menuCreationHelper.createMenuForNode(selectedSourceNode, menuManager,
- // true);
new VpeMenuCreator(menuManager, selectedSourceNode).createMenu();
contextMenu.setVisible(true);
onRefresh();
@@ -1599,7 +1523,7 @@
visualEditor.reload();
} else {
// Fix bugs JBIDE-2750
- visualBuilder.setSelectionRectangle(SelectionManager.EMPTY_SELECTION);
+ visualBuilder.clearSelectionRectangle();
visualEditor.reload();
// IDOMModel sourceModel = (IDOMModel) getModel();
// if (sourceModel != null) {
@@ -2439,7 +2363,7 @@
// node is created, see JBIDE-5105
visualEditor.reinitDesignMode();
- visualBuilder.setSelectionRectangle(SelectionManager.EMPTY_SELECTION);
+ visualBuilder.clearSelectionRectangle();
IDOMModel sourceModel = (IDOMModel) getModel();
if (sourceModel != null) {
IDOMDocument sourceDocument = sourceModel.getDocument();
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-08-22 17:00:15 UTC (rev 34144)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2011-08-22 17:23:20 UTC (rev 34145)
@@ -19,6 +19,7 @@
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -137,6 +138,7 @@
private Map<IStorage, Document> includeDocuments = new HashMap<IStorage, Document>();
private boolean showInvisibleTags;
private boolean showBorderForUnknownTags;
+ public static final List<nsIDOMNode> EMPTY_SELECTION = Collections.unmodifiableList(new ArrayList<nsIDOMNode>(0));
public VpeVisualDomBuilder(VpeDomMapping domMapping,
INodeAdapter sorceAdapter,
@@ -1078,11 +1080,7 @@
public void setSelectionRectangle(/* nsIDOMElement */List<nsIDOMNode> visualNodes) {
int resizerConstrains = VpeTagDescription.RESIZE_CONSTRAINS_NONE;
- /*
- * I've got null while pasting tag from one page to another.
- * Thus null checking should present.
- */
- if ((visualNodes != null) && (visualNodes.size() == 1)) {
+ if(visualNodes.size()==1){
resizerConstrains = getResizerConstrains(visualNodes.get(0));
}
visualEditor.setSelectionRectangle(visualNodes, resizerConstrains);
@@ -1598,4 +1596,8 @@
return span;
}
+
+ public void clearSelectionRectangle() {
+ setSelectionRectangle(VpeVisualDomBuilder.EMPTY_SELECTION);
+ }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2011-08-22 17:00:15 UTC (rev 34144)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2011-08-22 17:23:20 UTC (rev 34145)
@@ -12,7 +12,6 @@
package org.jboss.tools.vpe.editor.template;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
import org.eclipse.swt.graphics.Point;
@@ -40,7 +39,6 @@
*/
public class SelectionManager implements ISelectionManager {
- public static final List<nsIDOMNode> EMPTY_SELECTION = Collections.unmodifiableList(new ArrayList<nsIDOMNode>(0));
/**
* pageContext keeps information about page
*/
14 years, 7 months
JBoss Tools SVN: r34144 - trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-08-22 13:00:15 -0400 (Mon, 22 Aug 2011)
New Revision: 34144
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebWithModuleTest.java
Log:
unused imports removed
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebWithModuleTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebWithModuleTest.java 2011-08-22 16:58:10 UTC (rev 34143)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebWithModuleTest.java 2011-08-22 17:00:15 UTC (rev 34144)
@@ -13,18 +13,11 @@
import junit.framework.TestCase;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.jboss.tools.common.model.XModelObject;
-import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
-import org.jboss.tools.common.model.filesystems.impl.FileSystemsImpl;
-import org.jboss.tools.common.model.filesystems.impl.Libs;
-import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jst.web.kb.IKbProject;
import org.jboss.tools.jst.web.kb.KbProjectFactory;
import org.jboss.tools.jst.web.kb.taglib.ITagLibrary;
-import org.jboss.tools.test.util.JUnitUtils;
/**
*
14 years, 7 months
JBoss Tools SVN: r34142 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-08-22 12:43:06 -0400 (Mon, 22 Aug 2011)
New Revision: 34142
Modified:
trunk/build/target-platform/multiple.target
trunk/build/target-platform/multiple.target.p2mirror.xml
trunk/build/target-platform/unified.target
trunk/build/target-platform/unified.target.p2mirror.xml
Log:
JBIDE-9549 add egit/jgit to TP
Modified: trunk/build/target-platform/multiple.target
===================================================================
--- trunk/build/target-platform/multiple.target 2011-08-22 15:08:37 UTC (rev 34141)
+++ trunk/build/target-platform/multiple.target 2011-08-22 16:43:06 UTC (rev 34142)
@@ -220,6 +220,10 @@
<!-- <unit id="com.google.gdt.eclipse.suite.e36.feature.feature.group" version="1.4.2.v201012211742"/>
<unit id="com.google.gwt.eclipse.sdkbundle.e36.feature.2.2.0.feature.group" version="2.2.0.v201102111811"/>
<unit id="com.google.gdt.eclipse.suite.e36.feature.feature.group" version="2.2.0.v201102111811"/> -->
+
+ <!-- JBIDE-9549 add egit/jgit to TP -->
+ <unit id="org.eclipse.egit.feature.group" version="1.0.0"/>
+ <unit id="org.eclipse.jgit.feature.group" version="1.0.0"/>
</location>
</locations>
Modified: trunk/build/target-platform/multiple.target.p2mirror.xml
===================================================================
--- trunk/build/target-platform/multiple.target.p2mirror.xml 2011-08-22 15:08:37 UTC (rev 34141)
+++ trunk/build/target-platform/multiple.target.p2mirror.xml 2011-08-22 16:43:06 UTC (rev 34142)
@@ -199,6 +199,8 @@
<iu id="org.eclipse.wst.web_core.feature.feature.group" version=""/>
<iu id="org.eclipse.wst.ws_ui.feature.feature.group" version=""/>
<iu id="org.eclipse.wst.xml_core.feature.feature.group" version=""/>
+<iu id="org.eclipse.egit.feature.group" version=""/>
+<iu id="org.eclipse.jgit.feature.group" version=""/>
<iu id="org.drools.eclipse.feature.feature.group" version=""/>
<iu id="org.drools.eclipse.task.feature.feature.group" version=""/>
<iu id="org.guvnor.tools.feature.feature.group" version=""/>
Modified: trunk/build/target-platform/unified.target
===================================================================
--- trunk/build/target-platform/unified.target 2011-08-22 15:08:37 UTC (rev 34141)
+++ trunk/build/target-platform/unified.target 2011-08-22 16:43:06 UTC (rev 34142)
@@ -220,6 +220,10 @@
<!-- <unit id="com.google.gdt.eclipse.suite.e36.feature.feature.group" version="1.4.2.v201012211742"/>
<unit id="com.google.gwt.eclipse.sdkbundle.e36.feature.2.2.0.feature.group" version="2.2.0.v201102111811"/>
<unit id="com.google.gdt.eclipse.suite.e36.feature.feature.group" version="2.2.0.v201102111811"/> -->
+
+ <!-- JBIDE-9549 add egit/jgit to TP -->
+ <unit id="org.eclipse.egit.feature.group" version="1.0.0"/>
+ <unit id="org.eclipse.jgit.feature.group" version="1.0.0"/>
</location>
</locations>
@@ -231,4 +235,4 @@
<feature id="org.mozilla.xpcom.feature"/>
</includeBundles>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-</target>
\ No newline at end of file
+</target>
Modified: trunk/build/target-platform/unified.target.p2mirror.xml
===================================================================
--- trunk/build/target-platform/unified.target.p2mirror.xml 2011-08-22 15:08:37 UTC (rev 34141)
+++ trunk/build/target-platform/unified.target.p2mirror.xml 2011-08-22 16:43:06 UTC (rev 34142)
@@ -199,6 +199,8 @@
<iu id="org.eclipse.wst.web_core.feature.feature.group" version=""/>
<iu id="org.eclipse.wst.ws_ui.feature.feature.group" version=""/>
<iu id="org.eclipse.wst.xml_core.feature.feature.group" version=""/>
+<iu id="org.eclipse.egit.feature.group" version=""/>
+<iu id="org.eclipse.jgit.feature.group" version=""/>
<iu id="org.drools.eclipse.feature.feature.group" version=""/>
<iu id="org.drools.eclipse.task.feature.feature.group" version=""/>
<iu id="org.guvnor.tools.feature.feature.group" version=""/>
14 years, 7 months
JBoss Tools SVN: r34141 - trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-08-22 11:08:37 -0400 (Mon, 22 Aug 2011)
New Revision: 34141
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EgitPublishMethod.java
Log:
[JBIDE-9513] added monitors when committing and pushing
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EgitPublishMethod.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EgitPublishMethod.java 2011-08-22 14:56:42 UTC (rev 34140)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EgitPublishMethod.java 2011-08-22 15:08:37 UTC (rev 34141)
@@ -44,8 +44,8 @@
throws CoreException {
// TODO Auto-generated method stub
IProject project = module[0].getProject();
- EGitUtils.commit(project, null);
- EGitUtils.push(EGitUtils.getRepository(project), null);
+ EGitUtils.commit(project, monitor);
+ EGitUtils.push(EGitUtils.getRepository(project), monitor);
return IServer.PUBLISH_STATE_NONE;
}
14 years, 7 months
JBoss Tools SVN: r34140 - trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-08-22 10:56:42 -0400 (Mon, 22 Aug 2011)
New Revision: 34140
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EGitUtils.java
Log:
[JBIDE-9513] added checks for missing method arguments. Throwing exception if no repository is attached to the given proj (was: NPE)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EGitUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EGitUtils.java 2011-08-22 13:54:46 UTC (rev 34139)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EGitUtils.java 2011-08-22 14:56:42 UTC (rev 34140)
@@ -16,6 +16,7 @@
import java.util.List;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -60,10 +61,14 @@
* the core exception
*/
public static void commit(IProject project, IProgressMonitor monitor) throws CoreException {
+ Assert.isLegal(project != null, "Cannot commit project. No project provided");
/**
* TODO: add capability to commit selectively
*/
Repository repository = getRepository(project);
+ if (repository == null) {
+ throwCoreException(null, "Could not commit. Project \"{0}\" is not attached to a git repo", project.getName());
+ }
UserConfig userConfig = getUserConfig(repository);
CommitOperation op = new CommitOperation(
null,
@@ -92,18 +97,14 @@
try {
RemoteConfig remoteConfig = getRemoteConfig(repository);
if (remoteConfig == null) {
- IStatus status = new Status(IStatus.ERROR, EGitCoreActivator.PLUGIN_ID, NLS.bind(
- "Repository \"{0}\" has no remote repository configured", repository.toString()));
- throw new CoreException(status);
+ throwCoreException(null, "Repository \"{0}\" has no remote repository configured", repository.toString());
}
PushOperation pop = createPushOperation(repository, remoteConfig);
pop.run(monitor);
} catch (CoreException e) {
throw e;
} catch (Exception e) {
- IStatus status = new Status(IStatus.ERROR, EGitCoreActivator.PLUGIN_ID,
- NLS.bind("Could not push repo {0}", repository.toString()), e);
- throw new CoreException(status);
+ throwCoreException(e, "Could not push repo {0}", repository.toString());
}
}
@@ -143,15 +144,10 @@
spec.addURIRefUpdates(uri,
Transport.open(repository, uri).findRemoteRefUpdatesFor(pushRefSpecs));
} catch (NotSupportedException e) {
- IStatus status =
- new Status(IStatus.ERROR, EGitCoreActivator.PLUGIN_ID, NLS.bind(
- "Could not connect repository \"{0}\" to a remote", repository.toString()), e);
- throw new CoreException(status);
+ throwCoreException(e, "Could not connect repository \"{0}\" to a remote", repository.toString());
} catch (IOException e) {
- IStatus status = new Status(IStatus.ERROR, EGitCoreActivator.PLUGIN_ID, NLS.bind(
- "Could not convert remote specifications for repository \"{0}\" to a remote",
- repository.toString()), e);
- throw new CoreException(status);
+ throwCoreException(e, "Could not convert remote specifications for repository \"{0}\" to a remote",
+ repository.toString());
}
}
}
@@ -197,6 +193,8 @@
* @return the repository
*/
public static Repository getRepository(IProject project) {
+ Assert.isLegal(project != null, "Could not get repository. No project provided");
+
RepositoryMapping repositoryMapping = RepositoryMapping.getMapping(project);
if (repositoryMapping == null) {
return null;
@@ -217,11 +215,11 @@
* @see CommittHelper#calculateCommitInfo
*/
private static UserConfig getUserConfig(Repository repository) throws CoreException {
+ Assert.isLegal(repository != null, "Could not get user configuration. No repository provided.");
+
if (repository.getConfig() == null) {
- IStatus status = new Status(IStatus.ERROR, EGitCoreActivator.PLUGIN_ID,
- NLS.bind("no user configuration (author, committer) are present in repository \"{0}\"",
- repository.toString()));
- throw new CoreException(status);
+ throwCoreException(null, "no user configuration (author, committer) are present in repository \"{0}\"",
+ repository.toString());
}
return repository.getConfig().get(UserConfig.KEY);
}
@@ -242,13 +240,13 @@
* the core exception
*/
private static RemoteConfig getRemoteConfig(Repository repository) throws CoreException {
+ Assert.isLegal(repository != null, "Could not get configuration. No repository provided.");
+
String branch = null;
try {
branch = repository.getBranch();
} catch (IOException e) {
- IStatus status = new Status(IStatus.ERROR, EGitCoreActivator.PLUGIN_ID,
- NLS.bind("Could not get branch on repository \"{0}\"", repository.toString()), e);
- throw new CoreException(status);
+ throwCoreException(e, "Could not get branch on repository \"{0}\"", repository.toString());
}
String remoteName = getRemoteName(repository, branch);
@@ -320,4 +318,14 @@
}
return remoteName;
}
+
+ private static void throwCoreException(Exception e, String message, String... arguments) throws CoreException {
+ IStatus status = null;
+ if (e == null) {
+ new Status(IStatus.ERROR, EGitCoreActivator.PLUGIN_ID, NLS.bind(message, arguments));
+ } else {
+ new Status(IStatus.ERROR, EGitCoreActivator.PLUGIN_ID, NLS.bind(message, arguments), e);
+ }
+ throw new CoreException(status);
+ }
}
14 years, 7 months
JBoss Tools SVN: r34139 - trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2011-08-22 09:54:46 -0400 (Mon, 22 Aug 2011)
New Revision: 34139
Modified:
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDPaletteTest.java
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDTest.java
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMDeployTest.java
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMProjectTest.java
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMViewsTest.java
Log:
fixed Require annotation imports
Modified: trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDPaletteTest.java
===================================================================
--- trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDPaletteTest.java 2011-08-22 12:54:15 UTC (rev 34138)
+++ trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDPaletteTest.java 2011-08-22 13:54:46 UTC (rev 34139)
@@ -12,12 +12,12 @@
import org.eclipse.swt.graphics.Rectangle;
import org.jboss.tools.jbpm.ui.bot.test.suite.JBPMTest;
-import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.gef.SWTArranger;
import org.jboss.tools.ui.bot.ext.gef.SWTBotGefEditorExt;
import org.junit.Test;
-@SWTBotTestRequires(perspective = "jBPM jPDL 3", clearProjects = false, clearWorkspace = false)
+@Require(perspective = "jBPM jPDL 3", clearProjects = false, clearWorkspace = false)
public class GPDPaletteTest extends JBPMTest {
@Test
Modified: trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDTest.java
===================================================================
--- trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDTest.java 2011-08-22 12:54:15 UTC (rev 34138)
+++ trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/GPDTest.java 2011-08-22 13:54:46 UTC (rev 34139)
@@ -16,13 +16,13 @@
import org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot;
import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
import org.jboss.tools.jbpm.ui.bot.test.suite.JBPMTest;
-import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.gef.SWTBotGefEditorExt;
import org.jboss.tools.ui.bot.ext.gef.SWTBotGefFigure;
import org.jboss.tools.ui.bot.ext.widgets.SWTBotMultiPageEditor;
import org.junit.Test;
-@SWTBotTestRequires(perspective = "jBPM jPDL 3", clearProjects = false, clearWorkspace = false)
+@Require(perspective = "jBPM jPDL 3", clearProjects = false, clearWorkspace = false)
public class GPDTest extends JBPMTest {
String[] nodes = { "start", "first", "end" };
Modified: trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMDeployTest.java
===================================================================
--- trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMDeployTest.java 2011-08-22 12:54:15 UTC (rev 34138)
+++ trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMDeployTest.java 2011-08-22 13:54:46 UTC (rev 34139)
@@ -17,7 +17,7 @@
import org.jboss.tools.jbpm.ui.bot.test.suite.JBPMTest;
import org.jboss.tools.jbpm.ui.bot.test.suite.Project;
import org.jboss.tools.ui.bot.ext.config.Annotations.JBPM;
-import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
@@ -26,7 +26,7 @@
import org.jboss.tools.ui.bot.ext.widgets.SWTBotMultiPageEditor;
import org.junit.Test;
-@SWTBotTestRequires( clearProjects=false, jbpm=@JBPM(), server=(a)Server(type=ServerType.SOA,state=ServerState.Present))
+@Require( clearProjects=false, jbpm=@JBPM(), server=(a)Server(type=ServerType.SOA,state=ServerState.Present))
public class JBPMDeployTest extends JBPMTest {
@Test
Modified: trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMProjectTest.java
===================================================================
--- trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMProjectTest.java 2011-08-22 12:54:15 UTC (rev 34138)
+++ trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMProjectTest.java 2011-08-22 13:54:46 UTC (rev 34139)
@@ -14,14 +14,14 @@
import org.jboss.tools.jbpm.ui.bot.test.suite.JBPMTest;
import org.jboss.tools.jbpm.ui.bot.test.suite.Project;
import org.jboss.tools.ui.bot.ext.config.Annotations.JBPM;
-import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
import org.jboss.tools.ui.bot.ext.types.EntityType;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.view.PackageExplorer;
import org.junit.Test;
-@SWTBotTestRequires(jbpm=@JBPM, perspective = "jBPM jPDL 3", clearProjects = false)
+@Require(jbpm=@JBPM, perspective = "jBPM jPDL 3", clearProjects = false)
public class JBPMProjectTest extends JBPMTest {
@Test
Modified: trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMViewsTest.java
===================================================================
--- trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMViewsTest.java 2011-08-22 12:54:15 UTC (rev 34138)
+++ trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMViewsTest.java 2011-08-22 13:54:46 UTC (rev 34139)
@@ -12,13 +12,13 @@
import org.jboss.tools.jbpm.ui.bot.test.suite.JBPMTest;
import org.jboss.tools.jbpm.ui.bot.test.suite.Project;
-import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.gen.IView;
import org.jboss.tools.ui.bot.ext.view.PackageExplorer;
import org.junit.Test;
-@SWTBotTestRequires( perspective="jBPM jPDL 3", clearProjects = false )
+@Require( perspective="jBPM jPDL 3", clearProjects = false )
public class JBPMViewsTest extends JBPMTest {
@Test
14 years, 7 months
JBoss Tools SVN: r34138 - in trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext: config and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2011-08-22 08:54:15 -0400 (Mon, 22 Aug 2011)
New Revision: 34138
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Timing.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
Log:
botext: delay multiplier can be now defined via sys property
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Timing.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Timing.java 2011-08-22 12:53:31 UTC (rev 34137)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Timing.java 2011-08-22 12:54:15 UTC (rev 34138)
@@ -1,16 +1,30 @@
package org.jboss.tools.ui.bot.ext;
+import org.apache.log4j.Logger;
+import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
+
/**
- *
+ * This class abstracts waiting time for bot. These methods should be used everywhere, where we
+ * are waiting for something. Time can be then globally adjusted
+ * using @link {@link TestConfigurator#SWTBOTEXT_DELAY_MULTIPLIER} system property
* @author lzoubek
*
*/
public class Timing {
+ private static final Logger log = Logger.getLogger(Timing.class);
+
public static double multiplier=1.0;
static {
- // TODO determine or auto set multiplier
+ try {
+ multiplier = Double.parseDouble(System.getProperty(TestConfigurator.SWTBOTEXT_DELAY_MULTIPLIER, "1.0"));
+ if (multiplier<0) {
+ multiplier=1.0;
+ }
+ } catch (Exception ex) {
+ log.error("Unable to parse TestConfigurator.SWTBOTEXT_DELAY_MULTIPLIER", ex);
+ }
}
public static int time3S() {
return (int) Math.round(3000*multiplier);
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2011-08-22 12:53:31 UTC (rev 34137)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2011-08-22 12:54:15 UTC (rev 34138)
@@ -13,6 +13,7 @@
import java.util.regex.Pattern;
import org.apache.log4j.Logger;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.config.Annotations.DB;
import org.jboss.tools.ui.bot.ext.config.Annotations.ESB;
import org.jboss.tools.ui.bot.ext.config.Annotations.JBPM;
@@ -74,6 +75,10 @@
* path to property file which contains either 1 configuration or properties [config name]=[abs path to config property file]
*/
public static final String SWTBOT_TEST_PROPERTIES_FILE = "swtbot.test.properties.file";
+ /**
+ * a double number for multiply waiting see @link {@link Timing}
+ */
+ public static final String SWTBOTEXT_DELAY_MULTIPLIER="swtbotext.delay.multiplier";
public static Properties multiProperties = new Properties();
public static TestConfiguration currentConfig;
static {
@@ -158,6 +163,7 @@
log.info(" * Defaults loaded");
}
}
+ log.info("Default Timing mulitiplier is set to "+Timing.multiplier);
}
/**
14 years, 7 months
JBoss Tools SVN: r34137 - trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2011-08-22 08:53:31 -0400 (Mon, 22 Aug 2011)
New Revision: 34137
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEStableSubsetBotTests.java
Log:
vpebottest: added new test suite hopefully containing only stable tests
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEStableSubsetBotTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEStableSubsetBotTests.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEStableSubsetBotTests.java 2011-08-22 12:53:31 UTC (rev 34137)
@@ -0,0 +1,175 @@
+package org.jboss.tools.vpe.ui.bot.test;
+
+import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.jboss.tools.vpe.ui.bot.test.editor.BlockCommentTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.JspFileEditingTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.MinMaxPanesTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.StylesOnThePageTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.TextSelectionTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.ToggleCommentTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.VerificationOfNameSpacesTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.XhtmlFilePerformanceTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.pagedesign.AddSubstitutedELExpressionFolderScopeTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.pagedesign.EditingELValueTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.pagedesign.IncludedCssFilesJSPTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.pagedesign.IncludedCssFilesTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.pagedesign.IncludedTagLibsTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.pagedesign.ManipulatingELValueTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.pagedesign.SubstitutedELExressionsTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.pagedesign.ToolbarTextFormattingTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.preferences.AlwaysHideSelectionBarWithoutPromptTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.preferences.BorderForUnknownTagsTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.preferences.ChangeEditorTabForTheFirstOpenPageTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.preferences.GlobalELVariablesTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.preferences.PromptForTagAttributesDuringTagInsertTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.preferences.ShowNonVisualTagsTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.preferences.ShowResourceBundlesUsageasELexpressionsTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.preferences.ShowSelectionTagBarTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.selectionbar.SelectionBarTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.ActionParamTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.AjaxInvisibleTagsTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.AjaxValidatorTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.BeanValidatorTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.CalendarTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.ColumnGroupTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.ColumnTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.ColumnsTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.ComboBoxTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.CommandButtonTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.CommandLinkTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.CoreHTMLTagsTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.DataDefinitionTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.DataGridTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.DataListTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.DataOrderedListTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.DataScrollerTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.DataTableTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.EditorTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.ExtendedDataTableTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.FileUploadTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.HtmlCommandLinkTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.IncludeTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.InplaceInputTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.InplaceSelectInputTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.JSFTagsTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.ListShuttleTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.LogTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.PanelMenuTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.PanelTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.PickListTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.ProgressTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.SpacerTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.TogglePanelAndToogleControlTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.ToolbarAndToolbarGroupTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.TreeTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.VirtualEarthTagTest;
+import org.jboss.tools.vpe.ui.bot.test.jbide.JBIDE4556Test;
+import org.jboss.tools.vpe.ui.bot.test.jbide.JBIDE9445Test_DuplicateSourceMenu;
+import org.jboss.tools.vpe.ui.bot.test.palette.CancelTagLibDefenitionTest;
+import org.jboss.tools.vpe.ui.bot.test.palette.ImportTagsFromTLDFileTest;
+import org.jboss.tools.vpe.ui.bot.test.palette.ManagePaletteGroupsTest;
+import org.jboss.tools.vpe.ui.bot.test.palette.PaletteEditorTest;
+import org.jboss.tools.vpe.ui.bot.test.smoke.CodeCompletionTest;
+import org.jboss.tools.vpe.ui.bot.test.smoke.EditorSynchronizationTest;
+import org.jboss.tools.vpe.ui.bot.test.smoke.JSPPageCreationTest;
+import org.jboss.tools.vpe.ui.bot.test.smoke.MarkersTest;
+import org.jboss.tools.vpe.ui.bot.test.smoke.OpenOnTest;
+import org.jboss.tools.vpe.ui.bot.test.smoke.RenameFacesConfigFileTest;
+import org.jboss.tools.vpe.ui.bot.test.smoke.RenameJSPFileTest;
+import org.jboss.tools.vpe.ui.bot.test.smoke.RenameXHTMLFileTest;
+import org.jboss.tools.vpe.ui.bot.test.smoke.XHTMLPageCreationTest;
+import org.jboss.tools.vpe.ui.bot.test.wizard.ExternalizeStringsDialogTest;
+import org.jboss.tools.vpe.ui.bot.test.wizard.ImportUnknownTagsWizardTest;
+import org.jboss.tools.vpe.ui.bot.test.wizard.NewXHTMLPageWizardTest;
+import org.jboss.tools.vpe.ui.bot.test.wizard.VPESourceCodeTemplatesPreferencePageTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses ({
+ NewXHTMLPageWizardTest.class,
+ CodeCompletionTest.class,
+ ExternalizeStringsDialogTest.class,
+ CancelTagLibDefenitionTest.class,
+ ImportTagsFromTLDFileTest.class,
+ ToggleCommentTest.class,
+ BlockCommentTest.class,
+ ChangeEditorTabForTheFirstOpenPageTest.class,
+ JBIDE4556Test.class,
+ VerificationOfNameSpacesTest.class,
+ BorderForUnknownTagsTest.class,
+ ShowResourceBundlesUsageasELexpressionsTest.class,
+ ShowSelectionTagBarTest.class,
+ AlwaysHideSelectionBarWithoutPromptTest.class,
+ ShowNonVisualTagsTest.class,
+ AddSubstitutedELExpressionFolderScopeTest.class,
+ EditorSynchronizationTest.class,
+ JSPPageCreationTest.class,
+ XHTMLPageCreationTest.class,
+ RenameFacesConfigFileTest.class,
+ RenameJSPFileTest.class,
+ RenameXHTMLFileTest.class,
+ ImportUnknownTagsWizardTest.class,
+ VPESourceCodeTemplatesPreferencePageTest.class,
+ JspFileEditingTest.class,
+ ManagePaletteGroupsTest.class,
+ PaletteEditorTest.class,
+ ToolbarTextFormattingTest.class,
+ PromptForTagAttributesDuringTagInsertTest.class,
+ IncludedTagLibsTest.class,
+ SubstitutedELExressionsTest.class,
+ MinMaxPanesTest.class,
+ EditingELValueTest.class,
+ ManipulatingELValueTest.class,
+ SelectionBarTest.class,
+ IncludedCssFilesTest.class,
+ GlobalELVariablesTest.class,
+ IncludedCssFilesJSPTest.class,
+ StylesOnThePageTest.class,
+ TextSelectionTest.class,
+ CoreHTMLTagsTest.class,
+ JSFTagsTest.class,
+ ColumnsTagTest.class,
+ ComboBoxTagTest.class,
+ FileUploadTagTest.class,
+ InplaceInputTagTest.class,
+ InplaceSelectInputTagTest.class,
+ PickListTagTest.class,
+ ProgressTagTest.class,
+ PanelMenuTagTest.class,
+ ListShuttleTagTest.class,
+ DataDefinitionTagTest.class,
+ EditorTagTest.class,
+ TreeTagTest.class,
+ CalendarTagTest.class,
+ PanelTagTest.class,
+ DataTableTagTest.class,
+ SpacerTagTest.class,
+ DataScrollerTagTest.class,
+ ColumnTagTest.class,
+ ActionParamTagTest.class,
+ AjaxValidatorTagTest.class,
+ BeanValidatorTagTest.class,
+ ColumnGroupTagTest.class,
+ DataGridTagTest.class,
+ VirtualEarthTagTest.class,
+ DataListTagTest.class,
+ DataOrderedListTagTest.class,
+ ExtendedDataTableTagTest.class,
+ ToolbarAndToolbarGroupTagTest.class,
+ TogglePanelAndToogleControlTagTest.class,
+ CommandButtonTagTest.class,
+ CommandLinkTagTest.class,
+ HtmlCommandLinkTagTest.class,
+ IncludeTagTest.class,
+ AjaxInvisibleTagsTest.class,
+ LogTagTest.class,
+ OpenOnTest.class,
+ XhtmlFilePerformanceTest.class,
+ MarkersTest.class,
+ JBIDE9445Test_DuplicateSourceMenu.class
+})
+public class VPEStableSubsetBotTests extends SWTBotTestCase {
+
+}
14 years, 7 months
JBoss Tools SVN: r34136 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-08-22 08:27:31 -0400 (Mon, 22 Aug 2011)
New Revision: 34136
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
Null checking should present.
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-08-22 11:02:45 UTC (rev 34135)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2011-08-22 12:27:31 UTC (rev 34136)
@@ -1078,7 +1078,11 @@
public void setSelectionRectangle(/* nsIDOMElement */List<nsIDOMNode> visualNodes) {
int resizerConstrains = VpeTagDescription.RESIZE_CONSTRAINS_NONE;
- if(visualNodes.size()==1){
+ /*
+ * I've got null while pasting tag from one page to another.
+ * Thus null checking should present.
+ */
+ if ((visualNodes != null) && (visualNodes.size() == 1)) {
resizerConstrains = getResizerConstrains(visualNodes.get(0));
}
visualEditor.setSelectionRectangle(visualNodes, resizerConstrains);
14 years, 7 months