JBoss Tools SVN: r18728 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test: jbide and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2009-11-18 05:55:41 -0500 (Wed, 18 Nov 2009)
New Revision: 18728
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/EditingSPecialSymbolsVPE_JBIDE3810.java
Log:
Little fix of tests configuration
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-11-18 10:48:16 UTC (rev 18727)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-11-18 10:55:41 UTC (rev 18728)
@@ -106,6 +106,7 @@
TestSuite suite = new TestSuite("Tests for Vpe Jsf components"); //$NON-NLS-1$
// $JUnit-BEGIN$
+ suite.addTestSuite(EditingSPecialSymbolsVPE_JBIDE3810.class);
suite.addTestSuite(MozDirtyTest_JBIDE5105.class);
suite.addTestSuite(VpeI18nTest_JBIDE4887.class);
suite.addTestSuite(JsfComponentTest.class);
@@ -176,7 +177,6 @@
suite.addTestSuite(OpenOnCssClassTest_JBIDE4775.class);
suite.addTestSuite(VPERefreshTest.class);
suite.addTestSuite(OpenOnInsideJspRoot_JBIDE4852.class);
- suite.addTestSuite(EditingSPecialSymbolsVPE_JBIDE3810.class);
suite.addTestSuite(NullPointerWithStyleProperty_JBIDE5193.class);
// $JUnit-END$
// added by Max Areshkau
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/EditingSPecialSymbolsVPE_JBIDE3810.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/EditingSPecialSymbolsVPE_JBIDE3810.java 2009-11-18 10:48:16 UTC (rev 18727)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/EditingSPecialSymbolsVPE_JBIDE3810.java 2009-11-18 10:55:41 UTC (rev 18728)
@@ -33,7 +33,7 @@
private final static int clientX = 5;
private final static int clientY = 10;
- private final static long delay = 500;
+ private final static long delay = 1000;
public EditingSPecialSymbolsVPE_JBIDE3810(String name) {
super(name);
@@ -47,7 +47,7 @@
IEditorInput editorInput = new FileEditorInput(file);
JSPMultiPageEditor part = openEditor(editorInput);
TestUtil.waitForIdle();
- TestUtil.delay(3000);
+ TestUtil.delay(5000);
VpeController controller = TestUtil.getVpeController(part);
Mouse mouse = new Mouse(controller, delay);
mouse.click(clientX, clientY);
15 years, 1 month
JBoss Tools SVN: r18727 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-11-18 05:48:16 -0500 (Wed, 18 Nov 2009)
New Revision: 18727
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/ConsoleConfigurationPropertySource.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4899
String changed to constants call.
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/ConsoleConfigurationPropertySource.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/ConsoleConfigurationPropertySource.java 2009-11-18 10:46:33 UTC (rev 18726)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/ConsoleConfigurationPropertySource.java 2009-11-18 10:48:16 UTC (rev 18727)
@@ -32,6 +32,7 @@
import org.eclipse.datatools.connectivity.ProfileManager;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jface.viewers.ICellEditorValidator;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.osgi.util.NLS;
@@ -110,7 +111,7 @@
try {
ILaunchConfiguration lc = HibernateConsolePlugin.getDefault().findLaunchConfig(cfg.getName());
if (lc != null){
- String projectName = lc.getAttribute("org.eclipse.jdt.launching.PROJECT_ATTR", ""); //$NON-NLS-1$//$NON-NLS-2$
+ String projectName = lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); //$NON-NLS-1$
return Arrays.binarySearch(getSortedProjectNames(), projectName);
} else {
HibernateConsolePlugin.getDefault().log("Can't find Console Configuration \"" + cfg.getName() + "\"");//$NON-NLS-1$//$NON-NLS-2$
@@ -219,7 +220,7 @@
ILaunchConfiguration lc = HibernateConsolePlugin.getDefault().findLaunchConfig(cfg.getName());
if (lc != null){
ILaunchConfigurationWorkingCopy wc = lc.getWorkingCopy();
- wc.setAttribute("org.eclipse.jdt.launching.PROJECT_ATTR", getSortedProjectNames()[index]);////$NON-NLS-1$
+ wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, getSortedProjectNames()[index]);
wc.doSave();
} else {
HibernateConsolePlugin.getDefault().log("Can't find Console Configuration \"" + cfg.getName() + "\"");//$NON-NLS-1$//$NON-NLS-2$
@@ -266,7 +267,7 @@
try {
ILaunchConfiguration lc = HibernateConsolePlugin.getDefault().findLaunchConfig(cfg.getName());
if (lc != null){
- String projectName = lc.getAttribute("org.eclipse.jdt.launching.PROJECT_ATTR", (String)null); //$NON-NLS-1$
+ String projectName = lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
if (projectName != null){
return NLS.bind(HibernateConsoleMessages.ConsoleConfigurationMainTab_the_java_project_does_not_exist, projectName);
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2009-11-18 10:46:33 UTC (rev 18726)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2009-11-18 10:48:16 UTC (rev 18727)
@@ -557,6 +557,7 @@
}
if (flagFileWillBeCreated) {
setPathAttribute(currentLaunchConfig, IConsoleConfigurationLaunchConstants.CFG_XML_FILE, configFullPath);
+ setStrAttribute(currentLaunchConfig, IConsoleConfigurationLaunchConstants.CONFIGURATION_FACTORY, ConfigurationMode.CORE.toString());
ConsoleConfigurationMainTab ccmt = null;
ILaunchConfigurationTab[] tabs = tabGroup.getTabs();
for (int i = 0; i < tabs.length; i++) {
15 years, 1 month
JBoss Tools SVN: r18726 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console: src/org/hibernate/eclipse/console and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-11-18 05:46:33 -0500 (Wed, 18 Nov 2009)
New Revision: 18726
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/DeleteProjectParticipant.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationDeleteJavaProjectChange.java
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4899
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2009-11-18 10:24:52 UTC (rev 18725)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2009-11-18 10:46:33 UTC (rev 18726)
@@ -707,7 +707,7 @@
</enablement>
</moveParticipant>
<moveParticipant
- class="org.hibernate.eclipse.launch.core.refactoring.ConsoleConfigurationITypeMoveParticipant"
+ class="org.hibernate.eclipse.launch.core.refactoring.MoveResourceParticipant"
name="Console Configuration IType Participant"
id="org.hibernate.eclipse.launch.core.refactoring.ConsoleConfigurationITypeMoveParticipant">
<enablement>
@@ -724,6 +724,21 @@
</extension>
<extension
+ point="org.eclipse.ltk.core.refactoring.deleteParticipants">
+ <deleteParticipant
+ class="org.hibernate.eclipse.console.DeleteProjectParticipant"
+ id="org.hibernate.eclipse.console.deleteProjectParticipant"
+ name="Console Configuration Project delete participant">
+ <enablement>
+ <with
+ variable="element">
+ <instanceof
+ value="org.eclipse.core.resources.IProject">
+ </instanceof>
+ </with></enablement>
+ </deleteParticipant>
+ </extension>
+ <extension
point="org.eclipse.ui.popupMenus">
<!--<objectContribution
id="org.hibernate.eclipse.console.objectContribution2"
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/DeleteProjectParticipant.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/DeleteProjectParticipant.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/DeleteProjectParticipant.java 2009-11-18 10:46:33 UTC (rev 18726)
@@ -0,0 +1,52 @@
+package org.hibernate.eclipse.console;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.eclipse.ltk.core.refactoring.participants.DeleteParticipant;
+import org.hibernate.eclipse.launch.core.refactoring.ConsoleConfigurationDeleteJavaProjectChange;
+import org.hibernate.eclipse.launch.core.refactoring.HibernateRefactoringUtil;
+
+public class DeleteProjectParticipant extends DeleteParticipant {
+
+ private IProject javaProject;
+
+ @Override
+ public RefactoringStatus checkConditions(IProgressMonitor pm,
+ CheckConditionsContext context) throws OperationCanceledException {
+ return new RefactoringStatus();
+ }
+
+ @Override
+ public Change createChange(IProgressMonitor pm) throws CoreException,
+ OperationCanceledException {
+ ILaunchConfiguration[] configs = HibernateRefactoringUtil.getAffectedLaunchConfigurations(javaProject);
+
+ List<Change> changes = new ArrayList<Change>();
+ for (int i= 0; i < configs.length; i++) {
+ changes.add(new ConsoleConfigurationDeleteJavaProjectChange(configs[i]));
+ }
+
+ return HibernateRefactoringUtil.createChangesFromList(changes, getName());
+ }
+
+ @Override
+ public String getName() {
+ return HibernateConsoleMessages.DeleteProjectParticipant_console_configurations_updates;
+ }
+
+ @Override
+ protected boolean initialize(Object element) {
+ javaProject = (IProject)element;
+ return true;
+ }
+
+}
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/DeleteProjectParticipant.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2009-11-18 10:24:52 UTC (rev 18725)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2009-11-18 10:46:33 UTC (rev 18726)
@@ -495,6 +495,9 @@
public static String ConnectionProfileRenameChange_update_connection_profile_name;
public static String ConnectionProfileRenameParticipant_launch_configurations_updates;
+
+ public static String DeleteProjectParticipant_console_configurations_updates;
+ public static String DeleteProjectParticipant_delete_console_configuration;
//
static {
// initialize resource bundle
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2009-11-18 10:24:52 UTC (rev 18725)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2009-11-18 10:46:33 UTC (rev 18726)
@@ -482,6 +482,8 @@
LaunchConfigurationResourceNameChange_update_resource_path_in_launch_cfg=Update resource path in launch configuration
MoveResourceParticipant_launch_configurations_updates=Launch Configurations updates
RenameResourceParticipant_launch_configurations_updates=Launch Configurations updates
+DeleteProjectParticipant_console_configurations_updates=Delete related Console Configurations
+DeleteProjectParticipant_delete_console_configuration=Delete Console Configuration ''{0}''
ConsoleConfigurationITypeRenameParticipant_update=Console configuration participant
ConsoleConfigurationITypeRenameParticipant_update_names=Console configuration update time names
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationDeleteJavaProjectChange.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationDeleteJavaProjectChange.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationDeleteJavaProjectChange.java 2009-11-18 10:46:33 UTC (rev 18726)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.hibernate.eclipse.launch.core.refactoring;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.osgi.util.NLS;
+import org.hibernate.eclipse.console.HibernateConsoleMessages;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class ConsoleConfigurationDeleteJavaProjectChange extends Change {
+
+ private ILaunchConfiguration fLaunchConfiguration;
+
+ public ConsoleConfigurationDeleteJavaProjectChange(
+ ILaunchConfiguration iLaunchConfiguration) {
+ this.fLaunchConfiguration = iLaunchConfiguration;
+ }
+
+ @Override
+ public Object getModifiedElement() {
+ return fLaunchConfiguration;
+ }
+
+ @Override
+ public String getName() {
+ return NLS.bind(HibernateConsoleMessages.DeleteProjectParticipant_delete_console_configuration,
+ fLaunchConfiguration.getName());
+ }
+
+ @Override
+ public void initializeValidationData(IProgressMonitor pm) {}
+
+ @Override
+ public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException,
+ OperationCanceledException {
+ return new RefactoringStatus();
+ }
+
+ @Override
+ public Change perform(IProgressMonitor pm) throws CoreException {
+ fLaunchConfiguration.delete();
+ return null;
+ }
+
+}
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationDeleteJavaProjectChange.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java 2009-11-18 10:24:52 UTC (rev 18725)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java 2009-11-18 10:46:33 UTC (rev 18726)
@@ -27,6 +27,7 @@
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -351,6 +352,24 @@
return configs;
}
+ public static ILaunchConfiguration[] getAffectedLaunchConfigurations(IProject project){
+ ILaunchConfiguration[] configs = null;
+ try {
+ configs = LaunchHelper.findHibernateLaunchConfigs();
+ List<ILaunchConfiguration> list = new ArrayList<ILaunchConfiguration>();
+ for(int i = 0; i < configs.length && configs[i].exists(); i++) {//refactor only hibernate launch configurations
+ String projectName = configs[i].getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
+ if (project.getName().equals(projectName)) list.add(configs[i]);
+ }
+ configs = list.toArray(new ILaunchConfiguration[list.size()]);
+ }
+ catch(CoreException e) {
+ configs = new ILaunchConfiguration[0];
+ HibernateConsolePlugin.getDefault().logErrorMessage( ERROR_MESS, e );
+ }
+ return configs;
+ }
+
public static ILaunchConfiguration[] getAffectedLaunchConfigurations(IConnectionProfile profile){
ILaunchConfiguration[] configs = null;
try {
15 years, 1 month
JBoss Tools SVN: r18725 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2009-11-18 05:24:52 -0500 (Wed, 18 Nov 2009)
New Revision: 18725
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
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 2009-11-18 01:01:32 UTC (rev 18724)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2009-11-18 10:24:52 UTC (rev 18725)
@@ -1258,14 +1258,14 @@
}
public void keyPress(nsIDOMKeyEvent keyEvent) {
- // if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
- System.out.println("<<< keyPress type: " + keyEvent.getType() + //$NON-NLS-1$
- " Ctrl: "
- + keyEvent.getCtrlKey()
- + " Shift: " + keyEvent.getShiftKey() + //$NON-NLS-1$ //$NON-NLS-2$
- " CharCode: " + keyEvent.getCharCode()
- + " KeyCode: " + keyEvent.getKeyCode()); //$NON-NLS-1$ //$NON-NLS-2$
- // }
+ if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
+ System.out.println("<<< keyPress type: " + keyEvent.getType() + //$NON-NLS-1$
+ " Ctrl: "
+ + keyEvent.getCtrlKey()
+ + " Shift: " + keyEvent.getShiftKey() + //$NON-NLS-1$ //$NON-NLS-2$
+ " CharCode: " + keyEvent.getCharCode()
+ + " KeyCode: " + keyEvent.getKeyCode()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
if (!switcher
.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
switcher.stopActiveEditor();
@@ -2875,7 +2875,8 @@
float currentZoom = zoomEventManager.getCurrentZoom();
zoomEventManager = new ZoomEventManager(getXulRunnerEditor());
zoomEventManager.setCurrentZoom(currentZoom);
- ((KeyEventManager)keyEventHandler).setZoomEventManager(zoomEventManager);
+ ((KeyEventManager) keyEventHandler)
+ .setZoomEventManager(zoomEventManager);
// restore selection in visula part
sourceSelectionChanged();
} catch (VpeDisposeException ex) {
15 years, 1 month
JBoss Tools SVN: r18724 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-11-17 20:01:32 -0500 (Tue, 17 Nov 2009)
New Revision: 18724
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/ZoomEventManager.java
Log:
fix build compilation errors in ZoomEventManager.java
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/ZoomEventManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/ZoomEventManager.java 2009-11-17 19:46:05 UTC (rev 18723)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/ZoomEventManager.java 2009-11-18 01:01:32 UTC (rev 18724)
@@ -80,12 +80,10 @@
return availableZoomValues[currentZoomPos];
}
- @Override
public float getMaxZoom() {
return minZoom;
}
- @Override
public float getMinZoom() {
return maxZoom;
}
@@ -110,12 +108,10 @@
return currentZoomPos;
}
- @Override
public float getBasicZoom() {
return basicZoom;
}
- @Override
public float[] getAvailableZoomValues() {
return availableZoomValues;
}
15 years, 1 month
JBoss Tools SVN: r18723 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF and 19 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-11-17 14:46:05 -0500 (Tue, 17 Nov 2009)
New Revision: 18723
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe.html/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe.jsp/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.html.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.jsp.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF
Log:
revert (switch from Require-Bundle: 1.9.1 to Import-Package [1.9.1,2.0.0))
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -9,10 +9,10 @@
org.eclipse.ui,
org.eclipse.core.runtime,
org.jboss.tools.jst.jsp,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.jsf.vpe.richfaces;bundle-version="2.1.0",
org.jboss.tools.jsf.vpe.jsf;bundle-version="2.1.0",
org.eclipse.jface.text;bundle-version="3.5.0"
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -13,9 +13,9 @@
org.jboss.tools.vpe,
org.eclipse.core.resources,
org.jboss.tools.jst.jsp,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.eclipse.jface.text;bundle-version="3.5.0"
Export-Package: org.jboss.tools.jsf.vpe.facelets,
org.jboss.tools.jsf.vpe.facelets.template
Bundle-Version: 2.1.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -9,6 +9,7 @@
org.eclipse.core.runtime,
org.jboss.tools.common,
org.jboss.tools.vpe,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.jst.web,
org.jboss.tools.jst.jsp,
org.eclipse.wst.sse.core,
@@ -25,6 +26,5 @@
org.jboss.tools.jsf.vpe.jsf.template.util.model
Bundle-Localization: plugin
Import-Package: org.eclipse.wst.sse.ui,
- org.jboss.tools.jst.web.tld,
- org.mozilla.xpcom;version="[1.9.1,2.0.0)"
+ org.jboss.tools.jst.web.tld
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -9,6 +9,7 @@
org.eclipse.core.runtime,
org.jboss.tools.common,
org.jboss.tools.vpe,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.jst.jsp,
org.eclipse.wst.sse.core,
org.eclipse.jst.jsp.core,
@@ -18,6 +19,5 @@
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.jsf.vpe.jstl.template
Bundle-Localization: plugin
-Import-Package: org.jboss.tools.jst.web.tld,
- org.mozilla.xpcom;version="[1.9.1,2.0.0)"
+Import-Package: org.jboss.tools.jst.web.tld
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -9,6 +9,7 @@
org.eclipse.core.runtime,
org.jboss.tools.common,
org.jboss.tools.vpe,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.jst.jsp,
org.eclipse.jface.text;bundle-version="3.5.0"
Bundle-ActivationPolicy: lazy
@@ -17,4 +18,3 @@
Bundle-ClassPath: jsf-vpe-myfaces.jar
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -13,6 +13,7 @@
org.eclipse.wst.sse.ui,
org.eclipse.ui.workbench.texteditor,
org.eclipse.ui.ide,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.eclipse.wst.sse.core,
org.jboss.tools.vpe.xulrunner
Bundle-ActivationPolicy: lazy
@@ -22,4 +23,3 @@
Export-Package: org.jboss.tools.jsf.vpe.richfaces,
org.jboss.tools.jsf.vpe.richfaces.template.util
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -13,6 +13,7 @@
org.eclipse.wst.sse.ui,
org.eclipse.ui.workbench.texteditor,
org.eclipse.ui.ide,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.jsf.vpe.jsf;bundle-version="2.1.0",
org.eclipse.jface.text;bundle-version="3.5.0"
Bundle-Vendor: %Bundle-Vendor.0
@@ -20,4 +21,3 @@
Bundle-ClassPath: lib/antlr.jar,
.
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -17,6 +17,7 @@
org.jboss.tools.common.model,
org.jboss.tools.vpe.xulrunner,
org.jboss.tools.jsf.vpe.ajax4jsf,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.vpe.ui.test,
org.jboss.tools.vpe.resref;bundle-version="2.0.0",
org.jboss.tools.common.el.ui;bundle-version="1.0.0",
@@ -26,4 +27,3 @@
Export-Package: org.jboss.tools.jsf.vpe.ajax4jsf.test
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -15,11 +15,11 @@
org.jboss.tools.vpe.ui.test,
org.jboss.tools.jst.jsp,
org.jboss.tools.jst.web,
- org.jboss.tools.vpe.xulrunner
+ org.jboss.tools.vpe.xulrunner,
+ org.mozilla.xpcom;bundle-version="1.9.1"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.jsf.vpe.facelets.test
Bundle-ClassPath: facelets-tests.jar
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -15,6 +15,7 @@
org.jboss.tools.common.text.ext,
org.jboss.tools.common.model,
org.jboss.tools.vpe.xulrunner,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.vpe.ui.test;visibility:=reexport,
org.eclipse.jface.text,
org.jboss.tools.jsf.vpe.jsf,
@@ -33,4 +34,7 @@
Export-Package: org.jboss.tools.jsf.vpe.jsf.test
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
+
+
+
+
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -18,6 +18,7 @@
org.jboss.tools.common.model,
org.jboss.tools.vpe.xulrunner,
org.jboss.tools.jsf.vpe.richfaces,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.vpe.ui.test,
org.jboss.tools.vpe.resref;bundle-version="2.0.0",
org.jboss.tools.common.el.ui;bundle-version="1.0.0",
@@ -28,4 +29,3 @@
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -13,11 +13,11 @@
org.jboss.tools.common,
org.jboss.tools.vpe.ui.test,
org.jboss.tools.jst.jsp,
- org.jboss.tools.vpe.xulrunner
+ org.jboss.tools.vpe.xulrunner,
+ org.mozilla.xpcom;bundle-version="1.9.1"
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: vpe-seam-test.jar
Export-Package: org.jboss.tools.jsf.vpe.seam.test
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -49,6 +49,7 @@
org.eclipse.ui.views,
org.eclipse.ui.ide,
org.jboss.tools.vpe.xulrunner,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.eclipse.draw2d,
org.jboss.tools.jst.web;visibility:=reexport,
org.jboss.tools.vpe.resref,
@@ -62,4 +63,3 @@
org.jboss.tools.common.model.ui;bundle-version="2.0.0"
Bundle-Version: 2.1.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -8,6 +8,7 @@
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.jboss.tools.vpe,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.jst.jsp,
org.jboss.tools.common,
org.eclipse.jface.text;bundle-version="3.5.0"
@@ -15,4 +16,3 @@
Bundle-Localization: plugin
Export-Package: org.jboss.tools.vpe.html.template
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.jsp/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.jsp/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.jsp/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -8,10 +8,10 @@
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.jboss.tools.vpe,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.eclipse.core.resources,
org.jboss.tools.jst.jsp,
org.jboss.tools.common
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -6,6 +6,7 @@
Bundle-Activator: org.jboss.tools.vpe.xulrunner.BrowserPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.common
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.vpe.xulrunner;uses:="org.eclipse.jface.resource,org.eclipse.ui.plugin,org.osgi.framework",
@@ -16,5 +17,3 @@
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)",
- org.mozilla.interfaces;version="[1.9.1,2.0.0)"
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -16,10 +16,10 @@
org.jboss.tools.common.text.ext,
org.jboss.tools.common.model,
org.jboss.tools.vpe.xulrunner,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.vpe.ui.test
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: html-test.jar
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/vpe/tests/org.jboss.tools.vpe.jsp.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.jsp.test/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/vpe/tests/org.jboss.tools.vpe.jsp.test/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -13,11 +13,11 @@
org.jboss.tools.common,
org.jboss.tools.vpe.ui.test,
org.jboss.tools.jst.jsp,
- org.jboss.tools.vpe.xulrunner
+ org.jboss.tools.vpe.xulrunner,
+ org.mozilla.xpcom;bundle-version="1.9.1"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.vpe.jsp.test
Bundle-ClassPath: jsp-tests.jar
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -19,6 +19,7 @@
org.jboss.tools.common.text.ext;bundle-version="2.0.0",
org.jboss.tools.jst.web;bundle-version="2.0.0",
org.hamcrest;bundle-version="1.1.0",
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.vpe.xulrunner;bundle-version="2.1.0",
org.eclipse.jface.text;bundle-version="3.5.0",
org.jboss.tools.jst.jsp;bundle-version="2.0.0",
@@ -26,7 +27,7 @@
Eclipse-RegisterBuddy: org.apache.log4j
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: junit.framework,
- org.mozilla.xpcom;version="[1.9.1,2.0.0)"
+Import-Package: junit.framework
Export-Package: org.jboss.tools.vpe.ui.bot.test,
org.jboss.tools.vpe.ui.bot.test.jbide
+
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -16,6 +16,7 @@
org.jboss.tools.common.text.ext,
org.jboss.tools.common.model,
org.jboss.tools.vpe.xulrunner,
+ org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.jst.firstrun,
org.eclipse.wst.server.core,
org.eclipse.jface.text,
@@ -30,5 +31,4 @@
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.jboss.tools.vpe.resref.core,
- org.mozilla.xpcom;version="[1.9.1,2.0.0)"
+Import-Package: org.jboss.tools.vpe.resref.core
Modified: trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF 2009-11-17 19:13:46 UTC (rev 18722)
+++ trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF 2009-11-17 19:46:05 UTC (rev 18723)
@@ -10,9 +10,9 @@
org.junit,
org.jboss.tools.common,
org.jboss.tools.vpe.xulrunner,
+ org.mozilla.xpcom;bundle-version="1.9.1"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.vpe.xulrunner.test,
org.jboss.tools.vpe.xulrunner.view
Bundle-ClassPath: vpe-mozilla-tests.jar
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
15 years, 1 month
JBoss Tools SVN: r18722 - in trunk/vpe/plugins/org.jboss.tools.vpe: resources/org/jboss/tools/vpe/editor/mozilla/icons/menu and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2009-11-17 14:13:46 -0500 (Tue, 17 Nov 2009)
New Revision: 18722
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/editor/mozilla/icons/menu/
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/editor/mozilla/icons/menu/zoom_in.png
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/editor/mozilla/icons/menu/zoom_out.png
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/ZoomActionMenuManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/IZoomEventManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/ZoomEventManager.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/menu/VpeMenuCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/VpeMenuUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5217
https://jira.jboss.org/jira/browse/JBIDE-4323
add zoom to VPE.
Added: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/editor/mozilla/icons/menu/zoom_in.png
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/editor/mozilla/icons/menu/zoom_in.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/editor/mozilla/icons/menu/zoom_out.png
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/editor/mozilla/icons/menu/zoom_out.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
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 2009-11-17 18:59:50 UTC (rev 18721)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2009-11-17 19:13:46 UTC (rev 18722)
@@ -13,13 +13,11 @@
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
-
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.MenuManager;
@@ -120,11 +118,13 @@
import org.jboss.tools.vpe.editor.selection.VpeSelectionHelper;
import org.jboss.tools.vpe.editor.template.IKeyEventHandler;
import org.jboss.tools.vpe.editor.template.ISelectionManager;
+import org.jboss.tools.vpe.editor.template.IZoomEventManager;
import org.jboss.tools.vpe.editor.template.KeyEventManager;
import org.jboss.tools.vpe.editor.template.SelectionManager;
import org.jboss.tools.vpe.editor.template.VpeIncludeList;
import org.jboss.tools.vpe.editor.template.VpeTemplateListener;
import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
+import org.jboss.tools.vpe.editor.template.ZoomEventManager;
import org.jboss.tools.vpe.editor.toolbar.format.FormatControllerManager;
import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.DocTypeUtil;
@@ -206,7 +206,8 @@
private UIJob uiJob;
// JBIDE-675, visual refresh job
private UIJob visualRefreshJob;
- private UIJob reinitJob;
+ private UIJob reinitJob;
+ private IZoomEventManager zoomEventManager;
/**
* Added by Max Areshkau JBIDE-675, stores information about modification
@@ -227,9 +228,9 @@
private IKeyEventHandler keyEventHandler;
public final static String MODEL_FLAVOR = ModelTransfer.MODEL;
- //contains vpe update delau time in miliseconds
+ // contains vpe update delau time in miliseconds
private int vpeUpdateDelayTime;
-
+
public VpeController(VpeEditorPart editPart) {
this.editPart = editPart;
@@ -250,7 +251,8 @@
domMapping = new VpeDomMapping(pageContext);
sourceBuilder = new VpeSourceDomBuilder(domMapping, this,
VpeTemplateManager.getInstance(), sourceEditor, pageContext);
- visualBuilder = new VpeVisualDomBuilder(domMapping, this, visualEditor, pageContext);
+ visualBuilder = new VpeVisualDomBuilder(domMapping, this, visualEditor,
+ pageContext);
pageContext.setSourceDomBuilder(sourceBuilder);
pageContext.setVisualDomBuilder(visualBuilder);
IDOMModel sourceModel = (IDOMModel) getModel();
@@ -260,8 +262,9 @@
sourceModel.addModelLifecycleListener(this);
IEditorInput editorInput = pageContext.getEditPart().getEditorInput();
- //commented by Maksim Areshkau, as fix for https://jira.jboss.org/jira/browse/JBIDE-4534
- if(editorInput instanceof IFileEditorInput) {
+ // commented by Maksim Areshkau, as fix for
+ // https://jira.jboss.org/jira/browse/JBIDE-4534
+ if (editorInput instanceof IFileEditorInput) {
XModel xm = null;
IProject project = ((IFileEditorInput) editorInput).getFile()
.getProject();
@@ -274,29 +277,32 @@
WebAppHelper.getWebApp(xm));
}
}
-
+
// Fix for JBIDE-5105, JBIDE-5161
visualEditor.getEditor();
-
+
IDOMDocument sourceDocument = sourceModel.getDocument();
- // FIXED FOR JBIDE-3799 by sdzmitrovich, moved calling of this method to buid dom
+ // FIXED FOR JBIDE-3799 by sdzmitrovich, moved calling of this method to
+ // buid dom
// visualBuilder.refreshExternalLinks();
visualBuilder.buildDom(sourceDocument);
VpeTemplateManager.getInstance().addTemplateListener(this);
xulRunnerEditor = visualEditor.getXulRunnerEditor();
+ zoomEventManager = new ZoomEventManager(xulRunnerEditor);
// TODO Sergey Vasilyev figure out with nsIPressShell
// presShell = browser.getPresShell();
-
- //initialization visual selection controller
- visualSelectionController = new VpeSelectionController(visualEditor.getEditor().getSelectionController());
-
+
+ // initialization visual selection controller
+ visualSelectionController = new VpeSelectionController(visualEditor
+ .getEditor().getSelectionController());
+
selectionBuilder = new VpeSelectionBuilder(domMapping, sourceBuilder,
visualBuilder, visualSelectionController);
- selectionManager = new SelectionManager(pageContext,
- sourceEditor, visualSelectionController);
+ selectionManager = new SelectionManager(pageContext, sourceEditor,
+ visualSelectionController);
keyEventHandler = new KeyEventManager(sourceEditor, domMapping,
pageContext);
@@ -347,15 +353,17 @@
relativeFolderReferenceListListener = RelativeFolderReferenceList
.getInstance();
relativeFolderReferenceListListener.addChangeListener(this);
-
+
elReferenceListListener = ELReferenceList.getInstance();
elReferenceListListener.addChangeListener(this);
-
- //initialization of vpe update delay time
+
+ // initialization of vpe update delay time
vpeUpdateDelayTime = 400;
+
// pageContext.fireTaglibsChanged();
- // yradtsevich: we have to refresh VPE selection on init (fix of JBIDE-4037)
+ // yradtsevich: we have to refresh VPE selection on init (fix of
+ // JBIDE-4037)
sourceSelectionChanged(true);
}
@@ -377,7 +385,8 @@
}
if (optionsListener != null) {
- XModelObject optionsObject = ModelUtilities.getPreferenceModel().getByPath(VpePreference.EDITOR_PATH);
+ XModelObject optionsObject = ModelUtilities.getPreferenceModel()
+ .getByPath(VpePreference.EDITOR_PATH);
optionsObject.getModel().removeModelTreeListener(optionsListener);
optionsListener.dispose();
optionsListener = null;
@@ -418,7 +427,7 @@
if (visualEditor != null) {
visualEditor.setEditorDomEventListener(null);
if (visualSelectionController != null) {
-// visualSelectionController.Release();
+ // visualSelectionController.Release();
visualSelectionController = null;
}
// TODO Sergey Vasilyev figure out with Press Shell
@@ -438,8 +447,8 @@
if (absoluteFolderReferenceListListener != null) {
absoluteFolderReferenceListListener.removeChangeListener(this);
}
- if(elReferenceListListener!=null){
- elReferenceListListener.removeChangeListener(this);
+ if (elReferenceListListener != null) {
+ elReferenceListListener.removeChangeListener(this);
}
if (relativeFolderReferenceListListener != null) {
relativeFolderReferenceListListener.removeChangeListener(this);
@@ -474,18 +483,23 @@
uiJob = new UIJob(VpeUIMessages.VPE_UPDATE_JOB_TITLE) {
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
- monitor.beginTask(VpeUIMessages.VPE_UPDATE_JOB_TITLE, 100);
+ monitor.beginTask(VpeUIMessages.VPE_UPDATE_JOB_TITLE,
+ 100);
while (getChangeEvents().size() > 0) {
- monitor.worked((int) (100 / getChangeEvents().size()));
- VpeEventBean eventBean = getChangeEvents().getFirst();
+ 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.
+ /*
+ * 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 {
@@ -515,20 +529,24 @@
}
getChangeEvents().remove(eventBean);
}
- // cause is to lock calls others events
- if (switcher != null &&
- switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE))
+ // 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.
+ * 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();
+ toolbarFormatControllerManager
+ .selectionChanged();
}
} finally {
switcher.stopActiveEditor();
@@ -563,7 +581,8 @@
if (monitor.isCanceled()) {
return Status.CANCEL_STATUS;
} else {
- notifyChangedInUiThread(notifier, eventType, feature, oldValue, newValue, pos);
+ notifyChangedInUiThread(notifier, eventType, feature,
+ oldValue, newValue, pos);
}
return Status.OK_STATUS;
}
@@ -574,13 +593,15 @@
public void notifyChangedInUiThread(INodeNotifier notifier, int eventType,
Object feature, Object oldValue, Object newValue, int pos) {
- if (switcher == null ||
- !switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
+ if (switcher == null
+ || !switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
return;
}
try {
if (VpeDebug.PRINT_SOURCE_MUTATION_EVENT) {
- printSourceEvent(notifier, eventType, feature, oldValue, newValue, pos);
+ printSourceEvent(notifier, eventType, feature, oldValue,
+ newValue, pos);
}
if (visualBuilder == null) {
return;
@@ -610,14 +631,16 @@
if ((Attr) feature == lastRemovedAttr
&& !attrName.equals(lastRemovedAttrName)) {
lastRemovedAttr = null;
- visualBuilder.removeAttribute((Element) notifier, lastRemovedAttrName);
+ visualBuilder.removeAttribute((Element) notifier,
+ lastRemovedAttrName);
}
visualBuilder.setAttribute((Element) notifier,
((Attr) feature).getName(), (String) newValue);
} else {
lastRemovedAttr = (Attr) feature;
lastRemovedAttrName = ((Attr) feature).getName();
- visualBuilder.removeAttribute((Element) notifier, lastRemovedAttrName);
+ visualBuilder.removeAttribute((Element) notifier,
+ lastRemovedAttrName);
}
}
visualEditor.showResizer();
@@ -625,9 +648,9 @@
case INodeNotifier.ADD:
/*
- * https://jira.jboss.org/jira/browse/JBIDE-4102
- * Do nothing on comment node adding,
- * it is already updated in {@code INodeNotifier.REMOVE} case.
+ * https://jira.jboss.org/jira/browse/JBIDE-4102 Do nothing on
+ * comment node adding, it is already updated in {@code
+ * INodeNotifier.REMOVE} case.
*/
if (Node.COMMENT_NODE != ((Node) newValue).getNodeType()) {
/*
@@ -639,10 +662,9 @@
case INodeNotifier.REMOVE:
/*
- * https://jira.jboss.org/jira/browse/JBIDE-4102
- * When comment is changed there is no need
- * to update its parent or the whole structure,
- * only the comment node should be updated.
+ * https://jira.jboss.org/jira/browse/JBIDE-4102 When comment is
+ * changed there is no need to update its parent or the whole
+ * structure, only the comment node should be updated.
*/
if (Node.COMMENT_NODE == ((Node) feature).getNodeType()) {
visualBuilder.updateNode((Node) feature);
@@ -655,8 +677,8 @@
case INodeNotifier.STRUCTURE_CHANGED:
/*
- * https://jira.jboss.org/jira/browse/JBIDE-4102
- * Do not update parent tag when a comment was changed,
+ * https://jira.jboss.org/jira/browse/JBIDE-4102 Do not update
+ * parent tag when a comment was changed,
*/
if (!commentNodeChanged) {
visualEditor.hideResizer();
@@ -698,7 +720,8 @@
// INodeSelectionListener implementation
public void nodeSelectionChanged(NodeSelectionChangedEvent event) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
return;
}
try {
@@ -706,8 +729,11 @@
if (nodes != null && nodes.size() > 0) {
Node sourceNode = (Node) nodes.get(0);
if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
- System.out.println(">>>>>>>>>>>>>> nodeSelectionChanged sourceNode: " + //$NON-NLS-1$
- sourceNode.getNodeName() + Constants.WHITE_SPACE + event.getCaretPosition());
+ System.out
+ .println(">>>>>>>>>>>>>> nodeSelectionChanged sourceNode: " + //$NON-NLS-1$
+ sourceNode.getNodeName()
+ + Constants.WHITE_SPACE
+ + event.getCaretPosition());
}
if (event.getSource() instanceof IContentOutlinePage) {
sourceSelectionChanged();
@@ -721,12 +747,14 @@
// ITextSelectionListener implementation
// TODO Max Areshau looks like this method don't used
public void textSelectionChanged(TextSelectionChangedEvent event) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
return;
}
try {
if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
- System.out.println(">>>>>>>>>>>>>> textSelectionChanged " + event.getSource()); //$NON-NLS-1$
+ System.out
+ .println(">>>>>>>>>>>>>> textSelectionChanged " + event.getSource()); //$NON-NLS-1$
}
// if (event.getSource() instanceof StyledText) {
sourceSelectionChanged();
@@ -738,7 +766,8 @@
// SelectionListener implementation
public void widgetSelected(SelectionEvent event) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
return;
}
try {
@@ -760,7 +789,7 @@
}
public void sourceSelectionChanged() {
- sourceSelectionChanged(false);
+ sourceSelectionChanged(false);
}
public void sourceSelectionChanged(boolean showCaret) {
@@ -770,18 +799,18 @@
return;
}
-// Point range = sourceEditor.getTextViewer().getSelectedRange();
-// int anchorPosition = range.x;
-// int focusPosition = range.x + range.y;
-//
-// boolean extendFlag = range.y != 0;
-// boolean reversionFlag = extendFlag
-// && anchorPosition == VpeSelectionHelper
-// .getCaretOffset(sourceEditor);
-// if (reversionFlag) {
-// anchorPosition = focusPosition;
-// focusPosition = range.x;
-// }
+ // Point range = sourceEditor.getTextViewer().getSelectedRange();
+ // int anchorPosition = range.x;
+ // int focusPosition = range.x + range.y;
+ //
+ // boolean extendFlag = range.y != 0;
+ // boolean reversionFlag = extendFlag
+ // && anchorPosition == VpeSelectionHelper
+ // .getCaretOffset(sourceEditor);
+ // if (reversionFlag) {
+ // anchorPosition = focusPosition;
+ // focusPosition = range.x;
+ // }
if (selectionManager != null)
selectionManager.refreshVisualSelection();
@@ -857,7 +886,8 @@
}
public void sourceSelectionToVisualSelection(boolean showCaret) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
return;
}
try {
@@ -872,43 +902,47 @@
}
public void processPostModelEvent(ModelLifecycleEvent event) {
- //A part of fix JBIDE-5066
- if ((switcher==null)||(!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE))) {
+ // A part of fix JBIDE-5066
+ if ((switcher == null)
+ || (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE))) {
return;
}
try {
/*
* Added by Max Areshkau JBIDE-1457
- * ModelLifecycleEvent.MODEL_RELEASED is generated when model in model
- * calls methods releaseFromRead() or releaseFromEdit(). When editor
- * is open he has only when href on model, so nothing can generated
- * this event.When editor closes generation of this event depends
- * from containing any service href on model or not. It's can be a
- * reason of problems on reopen file.
- *
+ * ModelLifecycleEvent.MODEL_RELEASED is generated when model in
+ * model calls methods releaseFromRead() or releaseFromEdit(). When
+ * editor is open he has only when href on model, so nothing can
+ * generated this event.When editor closes generation of this event
+ * depends from containing any service href on model or not. It's
+ * can be a reason of problems on reopen file.
+ *
* We shouldn't call here rebuild dom.
*/
if (event.getType() == ModelLifecycleEvent.MODEL_RELEASED) {
if (VpeDebug.PRINT_SOURCE_MODEL_LIFECYCLE_EVENT) {
- System.out.println(">>> processPostModelEvent: " + event.toString()); //$NON-NLS-1$
+ System.out
+ .println(">>> processPostModelEvent: " + event.toString()); //$NON-NLS-1$
}
- // commented to fix org.mozilla.xpcom.XPCOMException: The function "repaint" returned an error condition (0x8000ffff)
- //visualBuilder.setSelectionRectangle(null);
+ // commented to fix org.mozilla.xpcom.XPCOMException: The
+ // function "repaint" returned an error condition (0x8000ffff)
+ // visualBuilder.setSelectionRectangle(null);
IStructuredModel model = event.getModel();
model.removeModelLifecycleListener(this);
IDOMModel sourceModel = (IDOMModel) getModel();
sourceModel.addModelLifecycleListener(this);
bundle.clearAll();
bundle.refresh();
- //visualBuilder.setSelectionRectangle(null);
+ // visualBuilder.setSelectionRectangle(null);
IDOMDocument sourceDocument = sourceModel.getDocument();
// JBIDE-1457
// visualBuilder.rebuildDom(sourceDocument);
// pageContext.fireTaglibsChanged();
}
} finally {
- //A part of fix JBIDE-5066
- if (switcher!=null) {
+ // A part of fix JBIDE-5066
+ if (switcher != null) {
switcher.stopActiveEditor();
}
}
@@ -916,7 +950,8 @@
// EditorDomEventListener implementation
public void subtreeModified(nsIDOMMutationEvent mutationEvent) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
try {
@@ -929,7 +964,8 @@
}
public void nodeInserted(nsIDOMMutationEvent mutationEvent) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
try {
@@ -947,7 +983,8 @@
}
public void nodeRemoved(nsIDOMMutationEvent mutationEvent) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
try {
@@ -966,7 +1003,8 @@
}
public void nodeRemovedFromDocument(nsIDOMMutationEvent mutationEvent) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
try {
@@ -979,7 +1017,8 @@
}
public void nodeInsertedIntoDocument(nsIDOMMutationEvent mutationEvent) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
try {
@@ -992,7 +1031,8 @@
}
public void attrModified(nsIDOMMutationEvent mutationEvent) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
try {
@@ -1005,7 +1045,8 @@
}
public void characterDataModified(nsIDOMMutationEvent mutationEvent) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
try {
@@ -1020,8 +1061,10 @@
}
}
- public void notifySelectionChanged(nsIDOMDocument doc, nsISelection selection, short reason) {
- if (switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+ public void notifySelectionChanged(nsIDOMDocument doc,
+ nsISelection selection, short reason) {
+ if (switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
try {
mouseUpSelectionReasonFlag = (reason & nsISelectionListener.MOUSEUP_REASON) > 0;
if (mouseUpSelectionReasonFlag
@@ -1033,19 +1076,20 @@
|| reason == nsISelectionListener.SELECTALL_REASON
|| (reason & nsISelectionListener.MOUSEDOWN_REASON) > 0) {
if (VpeDebug.PRINT_VISUAL_SELECTION_EVENT) {
- System.out.println("<<< notifySelectionChanged: " + reason); //$NON-NLS-1$
+ System.out
+ .println("<<< notifySelectionChanged: " + reason); //$NON-NLS-1$
}
nsIDOMNode node = SelectionUtil.getSelectedNode(selection);
/*
* Fixes https://jira.jboss.org/jira/browse/JBIDE-2571
- * Checking if the node is of text type was removed
- * to allow <select> node to be selected on the first click.
+ * Checking if the node is of text type was removed to allow
+ * <select> node to be selected on the first click.
*/
if (node != null) {
selectionManager.setSelection(selection);
}
}
- //enables cursor on selection event
+ // enables cursor on selection event
visualSelectionController.setCaretEnabled(true);
} finally {
switcher.stopActiveEditor();
@@ -1054,7 +1098,8 @@
}
public void mouseDown(nsIDOMMouseEvent mouseEvent) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
try {
@@ -1071,22 +1116,12 @@
// .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)
- */);
+ /*
+ * +visualNode. getNodeName() + " (" + visualNode +
+ * ") selectedElement: " +( visualDragElement != null ?
+ * visualDragElement . getNodeName() + " (" +
+ * visualDragElement + ")" : null)
+ */);
}
//
// if (visualDragElement != null) {
@@ -1115,10 +1150,13 @@
// selection will be set only if press left button
if (mouseEvent.getButton() == LEFT_BUTTON) {
selectionManager.setSelection(mouseEvent);
- //drag gesture isn't generated in XR 1.9 for Linux Platforms, so we start it's manually
- //mareshkau
- nsIDOMElement selectedElement = getXulRunnerEditor().getLastSelectedElement();
- if (VpeVisualDomBuilder.inDragArea(XulRunnerVpeUtils.getElementBounds(selectedElement), VisualDomUtil
+ // drag gesture isn't generated in XR 1.9 for Linux Platforms,
+ // so we start it's manually
+ // mareshkau
+ nsIDOMElement selectedElement = getXulRunnerEditor()
+ .getLastSelectedElement();
+ if (VpeVisualDomBuilder.inDragArea(XulRunnerVpeUtils
+ .getElementBounds(selectedElement), VisualDomUtil
.getMousePoint(mouseEvent))) {
dragGesture(mouseEvent);
}
@@ -1129,7 +1167,8 @@
}
public void mouseUp(nsIDOMMouseEvent mouseEvent) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
try {
@@ -1148,7 +1187,8 @@
}
public void mouseClick(nsIDOMMouseEvent mouseEvent) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
try {
@@ -1156,8 +1196,9 @@
if (visualNode != null) {
if (!mouseUpSelectionReasonFlag) {
if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
- System.out.println("<<< mouseClick visualNode: " + visualNode.getNodeName() + //$NON-NLS-1$
- " (" + visualNode + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+ System.out
+ .println("<<< mouseClick visualNode: " + visualNode.getNodeName() + //$NON-NLS-1$
+ " (" + visualNode + ")"); //$NON-NLS-1$ //$NON-NLS-2$
}
if (visualBuilder.isContentArea(visualNode)) {
// selectionBuilder.setClickContentAreaSelection();
@@ -1166,7 +1207,8 @@
mouseUpSelectionReasonFlag = false;
}
- if (visualBuilder.doToggle(VisualDomUtil.getTargetNode(mouseEvent))) {
+ if (visualBuilder.doToggle(VisualDomUtil
+ .getTargetNode(mouseEvent))) {
// selectionBuilder.setClickContentAreaSelection();
}
}
@@ -1176,16 +1218,18 @@
}
public void mouseDblClick(nsIDOMMouseEvent mouseEvent) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
try {
nsIDOMNode visualNode = VisualDomUtil.getTargetNode(mouseEvent);
if (visualNode != null) {
- sourceBuilder.openOn(visualNode);
+ sourceBuilder.openOn(visualNode);
if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
- System.out.println("<<< mouseDblClick visualNode: " + visualNode.getNodeName() + //$NON-NLS-1$
- " (" + visualNode + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+ System.out
+ .println("<<< mouseDblClick visualNode: " + visualNode.getNodeName() + //$NON-NLS-1$
+ " (" + visualNode + ")"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
} finally {
@@ -1194,7 +1238,8 @@
}
public void mouseMove(nsIDOMMouseEvent mouseEvent) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
try {
@@ -1213,12 +1258,16 @@
}
public void keyPress(nsIDOMKeyEvent keyEvent) {
- if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
- System.out.println("<<< keyPress type: " + keyEvent.getType() + //$NON-NLS-1$
- " Ctrl: " + keyEvent.getCtrlKey() + " Shift: " + keyEvent.getShiftKey() + //$NON-NLS-1$ //$NON-NLS-2$
- " CharCode: " + keyEvent.getCharCode() + " KeyCode: " + keyEvent.getKeyCode()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+ // if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
+ System.out.println("<<< keyPress type: " + keyEvent.getType() + //$NON-NLS-1$
+ " Ctrl: "
+ + keyEvent.getCtrlKey()
+ + " Shift: " + keyEvent.getShiftKey() + //$NON-NLS-1$ //$NON-NLS-2$
+ " CharCode: " + keyEvent.getCharCode()
+ + " KeyCode: " + keyEvent.getKeyCode()); //$NON-NLS-1$ //$NON-NLS-2$
+ // }
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
switcher.stopActiveEditor();
return;
}
@@ -1227,100 +1276,121 @@
} finally {
switcher.stopActiveEditor();
}
- setVpeUpdateDelayTime(0);
- /*
- * adding calls of core event handlers, for example' CTR+H' or
- * 'CTRL+M' event handler dialog
- */
- boolean keyBindingPressed = false;
- Event keyboardEvent = new Event();
- /*
- * widget where event occur
- */
- keyboardEvent.widget = xulRunnerEditor.getBrowser();
+ setVpeUpdateDelayTime(0);
+ /*
+ * adding calls of core event handlers, for example' CTR+H' or 'CTRL+M'
+ * event handler dialog
+ */
+ boolean keyBindingPressed = false;
+ Event keyboardEvent = new Event();
+ /*
+ * widget where event occur
+ */
+ keyboardEvent.widget = xulRunnerEditor.getBrowser();
- keyboardEvent.stateMask = (keyEvent.getAltKey() ? SWT.ALT : 0)
- | (keyEvent.getCtrlKey() ? SWT.CTRL : 0)
- | (keyEvent.getShiftKey() ? SWT.SHIFT : 0)
- | (keyEvent.getMetaKey() ? SWT.MOD1 : 0);
- keyboardEvent.x = 0;
- keyboardEvent.y = 0;
- keyboardEvent.type = SWT.KeyDown;
+ keyboardEvent.stateMask = (keyEvent.getAltKey() ? SWT.ALT : 0)
+ | (keyEvent.getCtrlKey() ? SWT.CTRL : 0)
+ | (keyEvent.getShiftKey() ? SWT.SHIFT : 0)
+ | (keyEvent.getMetaKey() ? SWT.MOD1 : 0);
+ keyboardEvent.x = 0;
+ keyboardEvent.y = 0;
+ keyboardEvent.type = SWT.KeyDown;
- if (keyEvent.getKeyCode() == 0) {
- keyboardEvent.keyCode = (int) keyEvent.getCharCode();
- } else {
- keyboardEvent.keyCode = (int) keyEvent.getKeyCode();
- }
- /*
- * JBIDE-1627
- */
- List<KeyStroke> possibleKeyStrokes = WorkbenchKeyboard
- .generatePossibleKeyStrokes(keyboardEvent);
- IWorkbench iWorkbench = VpePlugin.getDefault().getWorkbench();
- if (iWorkbench.hasService(IBindingService.class)) {
- IBindingService iBindingService = (IBindingService) iWorkbench
- .getService(IBindingService.class);
+ if (keyEvent.getKeyCode() == 0) {
+ keyboardEvent.keyCode = (int) keyEvent.getCharCode();
+ } else {
+ keyboardEvent.keyCode = (int) keyEvent.getKeyCode();
+ }
+ /*
+ * JBIDE-1627
+ */
+ List<KeyStroke> possibleKeyStrokes = WorkbenchKeyboard
+ .generatePossibleKeyStrokes(keyboardEvent);
+ IWorkbench iWorkbench = VpePlugin.getDefault().getWorkbench();
+ if (iWorkbench.hasService(IBindingService.class)) {
+ IBindingService iBindingService = (IBindingService) iWorkbench
+ .getService(IBindingService.class);
- KeySequence sequenceBeforeKeyStroke = KeySequence.getInstance();
-
- for (Iterator<KeyStroke> iterator = possibleKeyStrokes.iterator(); iterator.hasNext();) {
- KeySequence sequenceAfterKeyStroke =
- KeySequence.getInstance(sequenceBeforeKeyStroke, iterator.next());
- if (iBindingService.isPerfectMatch(sequenceAfterKeyStroke)) {
- final Binding binding = iBindingService.getPerfectMatch(sequenceAfterKeyStroke);
- if ((binding != null)
- && (binding.getParameterizedCommand() != null)
- && (binding.getParameterizedCommand().getCommand() != null)) {
- keyBindingPressed = true;
- }
+ KeySequence sequenceBeforeKeyStroke = KeySequence.getInstance();
+
+ for (Iterator<KeyStroke> iterator = possibleKeyStrokes.iterator(); iterator
+ .hasNext();) {
+ KeySequence sequenceAfterKeyStroke = KeySequence.getInstance(
+ sequenceBeforeKeyStroke, iterator.next());
+ if (iBindingService.isPerfectMatch(sequenceAfterKeyStroke)) {
+ final Binding binding = iBindingService
+ .getPerfectMatch(sequenceAfterKeyStroke);
+ if ((binding != null)
+ && (binding.getParameterizedCommand() != null)
+ && (binding.getParameterizedCommand().getCommand() != null)) {
+ keyBindingPressed = true;
}
}
}
- /*
- * Sends xulrunner event to eclipse environment.
- * dmaliarevich: while fixing JBIDE-2562 I found that
- * eclipse handles key shortcuts without this notification.
- */
- // getXulRunnerEditor().getBrowser().notifyListeners(
- // keyboardEvent.type, keyboardEvent);
+ }
+ /*
+ * Sends xulrunner event to eclipse environment. dmaliarevich: while
+ * fixing JBIDE-2562 I found that eclipse handles key shortcuts without
+ * this notification.
+ */
+ // getXulRunnerEditor().getBrowser().notifyListeners(
+ // keyboardEvent.type, keyboardEvent);
- /*
- * Fixes https://jira.jboss.org/jira/browse/JBIDE-2562
- * author: dmaliarevich
- *
- * When shortcut key is pressed do not handle this event in the
- * handler.
- */
- if (!keyBindingPressed) {
- if (keyEventHandler.handleKeyPress(keyEvent)) {
- /*
- * 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();
-// }
+ /*
+ * Fixes https://jira.jboss.org/jira/browse/JBIDE-2562 author:
+ * dmaliarevich
+ *
+ * When shortcut key is pressed do not handle this event in the handler.
+ */
+ boolean isHandleCurrentEvent = !keyBindingPressed
+ || isZoomEvent(keyEvent);
+ if (isHandleCurrentEvent) {
+ if (keyEventHandler instanceof KeyEventManager) {
+ IZoomEventManager zoomEventManager = ((KeyEventManager) keyEventHandler)
+ .getZoomEventManager();
+ if (zoomEventManager == null) {
+ this.zoomEventManager = new ZoomEventManager(
+ getXulRunnerEditor());
+ ((KeyEventManager) keyEventHandler)
+ .setZoomEventManager(this.zoomEventManager);
}
}
+ if (keyEventHandler.handleKeyPress(keyEvent)) {
+ /*
+ * 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();
+ // }
+ }
+ }
}
- public void elementResized(nsIDOMElement element, int constrains,
- int top, int left, int width, int height) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
+ private boolean isZoomEvent(nsIDOMKeyEvent keyEvent) {
+ return keyEvent.getCtrlKey()
+ && (keyEvent.getCharCode() == IZoomEventManager.ZOOM_IN_CH_CODE
+ || keyEvent.getCharCode() == IZoomEventManager.ZOOM_OUT_CH_CODE || keyEvent
+ .getCharCode() == IZoomEventManager.ZOOM_RESET_CH_CODE);
+ }
+
+ public void elementResized(nsIDOMElement element, int constrains, int top,
+ int left, int width, int height) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
try {
@@ -1333,19 +1403,19 @@
}
public void dragGesture(nsIDOMEvent domEvent) {
- nsIDOMMouseEvent mouseEvent =
- (nsIDOMMouseEvent) domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID);
+ nsIDOMMouseEvent mouseEvent = (nsIDOMMouseEvent) domEvent
+ .queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID);
boolean canDragFlag = canInnerDrag(mouseEvent);
// start drag sessionvpe-element
if (canDragFlag) {
-
+
startDragSession(domEvent);
}
}
/**
* Calls when on when browser receive context menu event.
- *
+ *
* @param contextFlags
* -not used in this function, just for because this parameter
* exist in nsIContextMenuListener
@@ -1354,22 +1424,26 @@
* @param node
* where this event are occur
*/
- public void onShowContextMenu(long contextFlags, nsIDOMEvent event, nsIDOMNode node) {
- //FIXED FOR JBIDE-3072 by sdzmitrovich
+ public void onShowContextMenu(long contextFlags, nsIDOMEvent event,
+ nsIDOMNode node) {
+ // FIXED FOR JBIDE-3072 by sdzmitrovich
-// nsIDOMNode visualNode = VisualDomUtil.getTargetNode(event);
-// if (visualNode != null) {
+ // nsIDOMNode visualNode = VisualDomUtil.getTargetNode(event);
+ // if (visualNode != null) {
Node selectedSourceNode = null;
- VpeNodeMapping nodeMapping = SelectionUtil.getNodeMappingBySourceSelection(sourceEditor, domMapping);
+ VpeNodeMapping nodeMapping = SelectionUtil
+ .getNodeMappingBySourceSelection(sourceEditor, domMapping);
if (nodeMapping != null) {
selectedSourceNode = nodeMapping.getSourceNode();
}
MenuManager menuManager = new MenuManager("#popup"); //$NON-NLS-1$
- final Menu contextMenu = menuManager.createContextMenu(visualEditor.getControl());
+ final Menu contextMenu = menuManager.createContextMenu(visualEditor
+ .getControl());
contextMenu.addMenuListener(new MenuListener() {
Menu menu = contextMenu;
+
public void menuHidden(MenuEvent e) {
Display.getCurrent().asyncExec(new Runnable() {
public void run() {
@@ -1377,14 +1451,17 @@
}
});
}
+
public void menuShown(MenuEvent e) {
}
});
// create context menu
-// MenuCreationHelper menuCreationHelper =
-// new MenuCreationHelper(domMapping, pageContext, sourceEditor, visualEditor);
-// menuCreationHelper.createMenuForNode(selectedSourceNode, menuManager, true);
+ // MenuCreationHelper menuCreationHelper =
+ // new MenuCreationHelper(domMapping, pageContext, sourceEditor,
+ // visualEditor);
+ // menuCreationHelper.createMenuForNode(selectedSourceNode, menuManager,
+ // true);
new VpeMenuCreator(menuManager, selectedSourceNode).createMenu();
contextMenu.setVisible(true);
}
@@ -1409,11 +1486,13 @@
if (monitor.isCanceled()) {
return Status.CANCEL_STATUS;
}
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
return Status.CANCEL_STATUS;
}
try {
- monitor.beginTask(VpeUIMessages.VPE_VISUAL_REFRESH_JOB, IProgressMonitor.UNKNOWN);
+ monitor.beginTask(VpeUIMessages.VPE_VISUAL_REFRESH_JOB,
+ IProgressMonitor.UNKNOWN);
visualRefreshImpl();
monitor.done();
setSynced(true);
@@ -1444,27 +1523,28 @@
void visualRefreshImpl() {
visualEditor.hideResizer();
-
- String currentDoctype = DocTypeUtil.getDoctype(visualEditor.getEditorInput());
+
+ String currentDoctype = DocTypeUtil.getDoctype(visualEditor
+ .getEditorInput());
/*
- * https://jira.jboss.org/jira/browse/JBIDE-3591
- * Avoid using missing resource.
+ * https://jira.jboss.org/jira/browse/JBIDE-3591 Avoid using missing
+ * resource.
*/
String visualEditorDoctype = visualEditor.getDoctype();
if ((null != currentDoctype) && (null != visualEditorDoctype)
- && (!visualEditorDoctype.equals(currentDoctype))) {
+ && (!visualEditorDoctype.equals(currentDoctype))) {
visualEditor.reload();
} else {
- //Fix bugs JBIDE-2750
+ // Fix bugs JBIDE-2750
visualBuilder.setSelectionRectangle(null);
visualEditor.reload();
-// IDOMModel sourceModel = (IDOMModel) getModel();
-// if (sourceModel != null) {
-// IDOMDocument sourceDocument = sourceModel.getDocument();
-// visualBuilder.rebuildDom(sourceDocument);
-// } else {
-// visualBuilder.rebuildDom(null);
-// }
+ // IDOMModel sourceModel = (IDOMModel) getModel();
+ // if (sourceModel != null) {
+ // IDOMDocument sourceDocument = sourceModel.getDocument();
+ // visualBuilder.rebuildDom(sourceDocument);
+ // } else {
+ // visualBuilder.rebuildDom(null);
+ // }
}
}
@@ -1480,30 +1560,38 @@
// for debug
private void printSourceEvent(INodeNotifier notifier, int eventType,
Object feature, Object oldValue, Object newValue, int pos) {
- System.out.println(">>> eventType: " + INodeNotifier.EVENT_TYPE_STRINGS[eventType] + //$NON-NLS-1$
- " pos: " + pos + " notifier: " + ((Node) notifier).getNodeName() + //$NON-NLS-1$ //$NON-NLS-2$
- " hashCode: " + notifier.hashCode()); //$NON-NLS-1$
+ System.out
+ .println(">>> eventType: " + INodeNotifier.EVENT_TYPE_STRINGS[eventType] + //$NON-NLS-1$
+ " pos: " + pos
+ + " notifier: " + ((Node) notifier).getNodeName() + //$NON-NLS-1$ //$NON-NLS-2$
+ " hashCode: " + notifier.hashCode()); //$NON-NLS-1$
if (feature != null) {
if (feature instanceof Node) {
- System.out.println(" feature: " + ((Node) feature).getNodeType() + //$NON-NLS-1$
- Constants.WHITE_SPACE + ((Node) feature).getNodeName() +
- " hashCode: " + feature.hashCode()); //$NON-NLS-1$
+ System.out
+ .println(" feature: " + ((Node) feature).getNodeType() + //$NON-NLS-1$
+ Constants.WHITE_SPACE
+ + ((Node) feature).getNodeName()
+ + " hashCode: " + feature.hashCode()); //$NON-NLS-1$
} else {
System.out.println(" feature: " + feature); //$NON-NLS-1$
}
}
if (oldValue != null) {
if (oldValue instanceof Node) {
- System.out.println(" oldValue: " + ((Node) oldValue).getNodeName() + //$NON-NLS-1$
- " hashCode: " + oldValue.hashCode()); //$NON-NLS-1$
+ System.out
+ .println(" oldValue: " + ((Node) oldValue).getNodeName() + //$NON-NLS-1$
+ " hashCode: " + oldValue.hashCode()); //$NON-NLS-1$
} else {
System.out.println(" oldValue: " + oldValue); //$NON-NLS-1$
}
}
if (newValue != null) {
if (newValue instanceof Node) {
- System.out.println(" newValue: " + ((Node) newValue).getNodeName() + //$NON-NLS-1$
- " hashCode: " + newValue.hashCode() + Constants.WHITE_SPACE + ((Node) newValue).getNodeType()); //$NON-NLS-1$
+ System.out
+ .println(" newValue: " + ((Node) newValue).getNodeName() + //$NON-NLS-1$
+ " hashCode: " + newValue.hashCode()
+ + Constants.WHITE_SPACE
+ + ((Node) newValue).getNodeType()); //$NON-NLS-1$
} else {
System.out.println(" newValue: " + newValue); //$NON-NLS-1$
}
@@ -1519,14 +1607,17 @@
System.out.print(" EventPhase: " + mutationEvent.getEventPhase()); //$NON-NLS-1$
nsIDOMNode relatedNode = mutationEvent.getRelatedNode();
- System.out.print(" RelatedNode: " + (relatedNode == null ? null : relatedNode.getNodeName())); //$NON-NLS-1$
+ System.out
+ .print(" RelatedNode: " + (relatedNode == null ? null : relatedNode.getNodeName())); //$NON-NLS-1$
nsIDOMNode targetNode = VisualDomUtil.getTargetNode(mutationEvent);
String name = targetNode != null ? targetNode.getNodeName() : null;
System.out.print(" TargetNode: " + name + " (" + targetNode + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- System.out.print(" PrevValue: " + mutationEvent.getPrevValue().trim()); //$NON-NLS-1$
- System.out.print(" NewValue: " + mutationEvent.getNewValue().trim()); //$NON-NLS-1$
+ System.out
+ .print(" PrevValue: " + mutationEvent.getPrevValue().trim()); //$NON-NLS-1$
+ System.out
+ .print(" NewValue: " + mutationEvent.getNewValue().trim()); //$NON-NLS-1$
}
System.out.println();
}
@@ -1566,22 +1657,24 @@
}
}
-// void refreshBundleValues() {
-// if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
-// return;
-// }
-// try {
-// if (bundle != null) {
-// bundle.refresh();
-// if (pageContext != null) {
-// pageContext.refreshBundleValues();
-// }
-// }
-// } finally {
-// switcher.stopActiveEditor();
-// }
-// }
-//
+ // void refreshBundleValues() {
+ // if
+ // (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE))
+ // {
+ // return;
+ // }
+ // try {
+ // if (bundle != null) {
+ // bundle.refresh();
+ // if (pageContext != null) {
+ // pageContext.refreshBundleValues();
+ // }
+ // }
+ // } finally {
+ // switcher.stopActiveEditor();
+ // }
+ // }
+ //
void refreshTemplates() {
if (includeList.includesRefresh()) {
visualRefresh();
@@ -1592,7 +1685,8 @@
if (bundle != null) {
bundle.refresh();
if (pageContext != null) {
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
return;
}
try {
@@ -1612,162 +1706,163 @@
public void structureChanged(XModelTreeEvent event) {
}
-// private Node getSourceNodeAt(int offset) {
-// if (sourceEditor != null && getModel() != null) {
-// IndexedRegion node = getModel().getIndexedRegion(offset);
-// if (node instanceof IDOMNode) {
-// VpeElementMapping elementMapping = domMapping
-// .getNearElementMapping((IDOMNode) node);
-// if (elementMapping != null) {
-// if (node instanceof IDOMElement) {
-// IDOMElement element = (IDOMElement) node;
-//
-// if (offset < element.getEndStartOffset()) {
-// NamedNodeMap attrs = element.getAttributes();
-// if (attrs != null) {
-// for (int i = 0; i < attrs.getLength(); i++) {
-// if (attrs.item(i) instanceof AttrImpl) {
-// AttrImpl attr = (AttrImpl) attrs.item(i);
-// if (getSourceAttributeOffset(attr, offset) != -1) {
-// String[] atributeNames = elementMapping.getTemplate().getOutputAtributeNames();
-// if (atributeNames != null
-// && atributeNames.length > 0
-// && attr.getName().equalsIgnoreCase(atributeNames[0])) {
-// return attr;
-// }
-// }
-// }
-// }
-// }
-// }
-// }
-// }
-// }
-// if (node == null) {
-// node = getModel().getIndexedRegion(offset - 1);
-// }
-// if (node instanceof Node) {
-// return (Node) node;
-// }
-// }
-// return null;
-// }
-//
-// private int getSourceNodeOffset(Node node, int pos, boolean endFlag) {
-// if (node == null)
-// return 0;
-// int start = ((IndexedRegion) node).getStartOffset();
-// int end = ((IndexedRegion) node).getEndOffset();
-//
-// switch (node.getNodeType()) {
-// case Node.ATTRIBUTE_NODE:
-// if (node instanceof AttrImpl) {
-// return getSourceAttributeOffset((AttrImpl) node, pos);
-// }
-// case Node.TEXT_NODE:
-// if (pos < start) {
-// return 0;
-// } else if (pos > end) {
-// return end - start;
-// } else {
-// return pos - start;
-// }
-// case Node.COMMENT_NODE:
-// if (pos > end) {
-// pos = end;
-// }
-// int offset = pos - start - 4;
-// return offset < 0 ? 0 : offset;
-// case Node.ELEMENT_NODE:
-// ElementImpl element = (ElementImpl) node;
-// if (element.isContainer()) {
-// if (pos < element.getStartEndOffset()) {
-// return 0;
-// } else {
-// return 1;
-// }
-// } else {
-// return endFlag ? 1 : 0;
-// }
-// default:
-// return endFlag ? 1 : 0;
-// }
-// }
-//
-// private int getSourceAttributeOffset(AttrImpl attr, int pos) {
-// if (attr.getValueRegion() != null) {
-// int start = attr.getValueRegionStartOffset();
-// String value = attr.getValueRegionText();
-// int len = value.length();
-// if (pos >= start && pos <= start + len) {
-// int offset = pos - start;
-// if (len > 1 && value.charAt(0) == '"'
-// && value.charAt(len - 1) == '"') {
-// if (offset <= 0 || offset >= len) {
-// return -1;
-// }
-// offset--;
-// }
-// return offset;
-// }
-// }
-// return -1;
-// }
-//
-// private int getSourceNodeOffset1(Node node, int pos, boolean endFlag) {
-// if (node == null)
-// return 0;
-// int start = ((IndexedRegion) node).getStartOffset();
-// int end = ((IndexedRegion) node).getEndOffset();
-//
-// switch (node.getNodeType()) {
-// case Node.ATTRIBUTE_NODE:
-// if (node instanceof AttrImpl) {
-// AttrImpl attr = (AttrImpl) node;
-// start = attr.getValueRegionStartOffset();
-// end = start + attr.getValueRegion().getLength();
-// int ret = 0;
-// if (pos > end) {
-// ret = end - start;
-// } else {
-// ret = pos - start;
-// }
-// if (ret > 0 && attr.getValueRegionText().charAt(0) == '"') {
-// ret--;
-// }
-// return ret;
-// }
-// case Node.TEXT_NODE:
-// if (pos < start) {
-// return 0;
-// } else if (pos > end) {
-// return end - start;
-// } else {
-// return pos - start;
-// }
-// case Node.COMMENT_NODE:
-// if (pos > end) {
-// pos = end;
-// }
-// int offset = pos - start - 4;
-// return offset < 0 ? 0 : offset;
-// case Node.ELEMENT_NODE:
-// ElementImpl element = (ElementImpl) node;
-// if (element.isContainer()) {
-// if (pos < element.getStartEndOffset()) {
-// return 0;
-// } else if (pos < element.getStartEndOffset()) {
-// return 1;
-// } else if (pos == element.getStartEndOffset()) {
-// return 2;
-// }
-// } else {
-// return endFlag ? 1 : 0;
-// }
-// default:
-// return endFlag ? 1 : 0;
-// }
-// }
+ // private Node getSourceNodeAt(int offset) {
+ // if (sourceEditor != null && getModel() != null) {
+ // IndexedRegion node = getModel().getIndexedRegion(offset);
+ // if (node instanceof IDOMNode) {
+ // VpeElementMapping elementMapping = domMapping
+ // .getNearElementMapping((IDOMNode) node);
+ // if (elementMapping != null) {
+ // if (node instanceof IDOMElement) {
+ // IDOMElement element = (IDOMElement) node;
+ //
+ // if (offset < element.getEndStartOffset()) {
+ // NamedNodeMap attrs = element.getAttributes();
+ // if (attrs != null) {
+ // for (int i = 0; i < attrs.getLength(); i++) {
+ // if (attrs.item(i) instanceof AttrImpl) {
+ // AttrImpl attr = (AttrImpl) attrs.item(i);
+ // if (getSourceAttributeOffset(attr, offset) != -1) {
+ // String[] atributeNames =
+ // elementMapping.getTemplate().getOutputAtributeNames();
+ // if (atributeNames != null
+ // && atributeNames.length > 0
+ // && attr.getName().equalsIgnoreCase(atributeNames[0])) {
+ // return attr;
+ // }
+ // }
+ // }
+ // }
+ // }
+ // }
+ // }
+ // }
+ // }
+ // if (node == null) {
+ // node = getModel().getIndexedRegion(offset - 1);
+ // }
+ // if (node instanceof Node) {
+ // return (Node) node;
+ // }
+ // }
+ // return null;
+ // }
+ //
+ // private int getSourceNodeOffset(Node node, int pos, boolean endFlag) {
+ // if (node == null)
+ // return 0;
+ // int start = ((IndexedRegion) node).getStartOffset();
+ // int end = ((IndexedRegion) node).getEndOffset();
+ //
+ // switch (node.getNodeType()) {
+ // case Node.ATTRIBUTE_NODE:
+ // if (node instanceof AttrImpl) {
+ // return getSourceAttributeOffset((AttrImpl) node, pos);
+ // }
+ // case Node.TEXT_NODE:
+ // if (pos < start) {
+ // return 0;
+ // } else if (pos > end) {
+ // return end - start;
+ // } else {
+ // return pos - start;
+ // }
+ // case Node.COMMENT_NODE:
+ // if (pos > end) {
+ // pos = end;
+ // }
+ // int offset = pos - start - 4;
+ // return offset < 0 ? 0 : offset;
+ // case Node.ELEMENT_NODE:
+ // ElementImpl element = (ElementImpl) node;
+ // if (element.isContainer()) {
+ // if (pos < element.getStartEndOffset()) {
+ // return 0;
+ // } else {
+ // return 1;
+ // }
+ // } else {
+ // return endFlag ? 1 : 0;
+ // }
+ // default:
+ // return endFlag ? 1 : 0;
+ // }
+ // }
+ //
+ // private int getSourceAttributeOffset(AttrImpl attr, int pos) {
+ // if (attr.getValueRegion() != null) {
+ // int start = attr.getValueRegionStartOffset();
+ // String value = attr.getValueRegionText();
+ // int len = value.length();
+ // if (pos >= start && pos <= start + len) {
+ // int offset = pos - start;
+ // if (len > 1 && value.charAt(0) == '"'
+ // && value.charAt(len - 1) == '"') {
+ // if (offset <= 0 || offset >= len) {
+ // return -1;
+ // }
+ // offset--;
+ // }
+ // return offset;
+ // }
+ // }
+ // return -1;
+ // }
+ //
+ // private int getSourceNodeOffset1(Node node, int pos, boolean endFlag) {
+ // if (node == null)
+ // return 0;
+ // int start = ((IndexedRegion) node).getStartOffset();
+ // int end = ((IndexedRegion) node).getEndOffset();
+ //
+ // switch (node.getNodeType()) {
+ // case Node.ATTRIBUTE_NODE:
+ // if (node instanceof AttrImpl) {
+ // AttrImpl attr = (AttrImpl) node;
+ // start = attr.getValueRegionStartOffset();
+ // end = start + attr.getValueRegion().getLength();
+ // int ret = 0;
+ // if (pos > end) {
+ // ret = end - start;
+ // } else {
+ // ret = pos - start;
+ // }
+ // if (ret > 0 && attr.getValueRegionText().charAt(0) == '"') {
+ // ret--;
+ // }
+ // return ret;
+ // }
+ // case Node.TEXT_NODE:
+ // if (pos < start) {
+ // return 0;
+ // } else if (pos > end) {
+ // return end - start;
+ // } else {
+ // return pos - start;
+ // }
+ // case Node.COMMENT_NODE:
+ // if (pos > end) {
+ // pos = end;
+ // }
+ // int offset = pos - start - 4;
+ // return offset < 0 ? 0 : offset;
+ // case Node.ELEMENT_NODE:
+ // ElementImpl element = (ElementImpl) node;
+ // if (element.isContainer()) {
+ // if (pos < element.getStartEndOffset()) {
+ // return 0;
+ // } else if (pos < element.getStartEndOffset()) {
+ // return 1;
+ // } else if (pos == element.getStartEndOffset()) {
+ // return 2;
+ // }
+ // } else {
+ // return endFlag ? 1 : 0;
+ // }
+ // default:
+ // return endFlag ? 1 : 0;
+ // }
+ // }
class VpeSelectionProvider implements ISelectionProvider {
VpeSelection selection;
@@ -1784,10 +1879,12 @@
selection = new VpeSelection(offset, length);
}
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ public void addSelectionChangedListener(
+ ISelectionChangedListener listener) {
}
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+ public void removeSelectionChangedListener(
+ ISelectionChangedListener listener) {
}
public ISelection getSelection() {
@@ -1812,12 +1909,12 @@
this.length = length;
if (length > 0) {
- try {
- text = sourceEditor.getTextViewer().getDocument().get(
- offset, length);
- } catch (BadLocationException e) {
- VpePlugin.getPluginLog().logError(e);
- }
+ try {
+ text = sourceEditor.getTextViewer().getDocument().get(
+ offset, length);
+ } catch (BadLocationException e) {
+ VpePlugin.getPluginLog().logError(e);
+ }
}
}
@@ -1968,14 +2065,15 @@
}
switch (dragNode.getNodeType()) {
case nsIDOMNode.ELEMENT_NODE: {
- canDrag = visualBuilder.canInnerDrag((nsIDOMElement) dragNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID));
+ canDrag = visualBuilder.canInnerDrag((nsIDOMElement) dragNode
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID));
break;
}
case nsIDOMNode.TEXT_NODE: {
canDrag = visualBuilder.isTextEditable(dragNode);
break;
- }
}
+ }
if (canDrag) {
VpeSourceInnerDragInfo sourceInnerDragInfo = visualBuilder
.getSourceInnerDragInfo(dragInfo);
@@ -2039,24 +2137,24 @@
.getInnerDropInfo(event);
if (visualDropInfo.getDropContainer() != null) {
if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
- System.out.print(
- " x: " //$NON-NLS-1$
- + visualDropInfo.getMouseX()
- + " y: " //$NON-NLS-1$
- + visualDropInfo.getMouseY()
- + " container: " //$NON-NLS-1$
+ System.out.print(" x: " //$NON-NLS-1$
+ + visualDropInfo.getMouseX()
+ + " y: " //$NON-NLS-1$
+ + visualDropInfo.getMouseY()
+ + " container: " //$NON-NLS-1$
+ visualDropInfo.getDropContainer().getNodeName()
- + "(" //$NON-NLS-1$
- + visualDropInfo.getDropContainer()
- + ") parent: " //$NON-NLS-1$
- + visualDropInfo.getDropContainer().getParentNode().getNodeName()
- + "(" //$NON-NLS-1$
+ + "(" //$NON-NLS-1$
+ + visualDropInfo.getDropContainer()
+ + ") parent: " //$NON-NLS-1$
+ visualDropInfo.getDropContainer().getParentNode()
- + ") offset: " //$NON-NLS-1$
+ .getNodeName()
+ + "(" //$NON-NLS-1$
+ + visualDropInfo.getDropContainer().getParentNode()
+ + ") offset: " //$NON-NLS-1$
+ visualDropInfo.getDropOffset());
}
- VpeSourceInnerDragInfo sourceInnerDragInfo =
- visualBuilder.getSourceInnerDragInfo(innerDragInfo);
+ VpeSourceInnerDragInfo sourceInnerDragInfo = visualBuilder
+ .getSourceInnerDragInfo(innerDragInfo);
VpeSourceInnerDropInfo sourceDropInfo = visualBuilder
.getSourceInnerDropInfo(sourceInnerDragInfo.getNode(),
visualDropInfo, true);
@@ -2241,8 +2339,9 @@
IDropCommand dropCommand = DropCommandFactory.getInstance()
.getDropCommand(flavor, JSPTagProposalFactory.getInstance());
- boolean promptAttributes = JspEditorPlugin.getDefault().getPreferenceStore().getBoolean(
- IVpePreferencesPage.ASK_TAG_ATTRIBUTES_ON_TAG_INSERT);
+ boolean promptAttributes = JspEditorPlugin.getDefault()
+ .getPreferenceStore().getBoolean(
+ IVpePreferencesPage.ASK_TAG_ATTRIBUTES_ON_TAG_INSERT);
dropCommand.getDefaultModel().setPromptForTagAttributesRequired(
promptAttributes);
DropData dropData = new DropData(flavor, data, sourceEditor
@@ -2250,13 +2349,14 @@
.getAdapter(ISourceViewer.class), new VpeSelectionProvider(
range.x, range.y), container);
/*
- * https://jira.jboss.org/jira/browse/JBIDE-4982
- * Setting the value provider to create tag insert dialog.
+ * https://jira.jboss.org/jira/browse/JBIDE-4982 Setting the value
+ * provider to create tag insert dialog.
*/
if (sourceEditor instanceof JSPTextEditor) {
- dropData.setValueProvider(((JSPTextEditor) sourceEditor).createAttributeDescriptorValueProvider());
+ dropData.setValueProvider(((JSPTextEditor) sourceEditor)
+ .createAttributeDescriptorValueProvider());
}
-
+
dropCommand.execute(dropData);
}
@@ -2274,82 +2374,88 @@
return tagname;
}
-
- public void externalDrop(nsIDOMMouseEvent mouseEvent, String flavor, String data) {
- onHideTooltip();
- VpeVisualInnerDropInfo visualDropInfo = selectionBuilder.getInnerDropInfo(mouseEvent);
- Point range = selectionBuilder.getSourceSelectionRangeAtVisualNode(visualDropInfo.getDropContainer(), (int) visualDropInfo
- .getDropOffset());
-
- // if (MODEL_FLAVOR.equals(flavor)) {
- // XModelObject object = PreferenceModelUtilities.getPreferenceModel()
- // .getModelBuffer().source();
- // if(object == null)
+ public void externalDrop(nsIDOMMouseEvent mouseEvent, String flavor,
+ String data) {
+ onHideTooltip();
- final DragTransferData dragTransferData = DndUtil.getDragTransferData();
+ VpeVisualInnerDropInfo visualDropInfo = selectionBuilder
+ .getInnerDropInfo(mouseEvent);
+ Point range = selectionBuilder.getSourceSelectionRangeAtVisualNode(
+ visualDropInfo.getDropContainer(), (int) visualDropInfo
+ .getDropOffset());
+
+ // if (MODEL_FLAVOR.equals(flavor)) {
+ // XModelObject object = PreferenceModelUtilities.getPreferenceModel()
+ // .getModelBuffer().source();
+ // if(object == null)
+
+ final DragTransferData dragTransferData = DndUtil.getDragTransferData();
final nsISupports aValue = dragTransferData.getValue();
- String aFlavor = ""; //$NON-NLS-1$
- if (VpeDndUtil.isNsIFileInstance(aValue)) {
- nsIFile aFile = (nsIFile) aValue.queryInterface(nsIFile.NS_IFILE_IID);
-
- // because it is external, convert the path to URL
- final String path = aFile.getPath();
- data = path != null ? DropUtils.convertPathToUrl(path)
- : null;
+ String aFlavor = ""; //$NON-NLS-1$
+ if (VpeDndUtil.isNsIFileInstance(aValue)) {
+ nsIFile aFile = (nsIFile) aValue
+ .queryInterface(nsIFile.NS_IFILE_IID);
+
+ // because it is external, convert the path to URL
+ final String path = aFile.getPath();
+ data = path != null ? DropUtils.convertPathToUrl(path) : null;
aFlavor = DndUtil.kFileMime;
- } else if (VpeDndUtil.isNsICStringInstance(aValue)) {
- nsISupportsCString aString = (nsISupportsCString) aValue.queryInterface(nsISupportsCString.NS_ISUPPORTSCSTRING_IID);
- data = aString.getData();
- aFlavor = DndUtil.kHTMLMime;
- } else if (VpeDndUtil.isNsIStringInstance(aValue)) {
- nsISupportsString aString = (nsISupportsString) aValue.queryInterface(nsISupportsString.NS_ISUPPORTSSTRING_IID);
- data = aString.getData();
- if (MODEL_FLAVOR.equals( dragTransferData.getFlavor() )) {
- aFlavor = dragTransferData.getFlavor();
- } else {
- aFlavor = DndUtil.kURLMime;
- }
- }
+ } else if (VpeDndUtil.isNsICStringInstance(aValue)) {
+ nsISupportsCString aString = (nsISupportsCString) aValue
+ .queryInterface(nsISupportsCString.NS_ISUPPORTSCSTRING_IID);
+ data = aString.getData();
+ aFlavor = DndUtil.kHTMLMime;
+ } else if (VpeDndUtil.isNsIStringInstance(aValue)) {
+ nsISupportsString aString = (nsISupportsString) aValue
+ .queryInterface(nsISupportsString.NS_ISUPPORTSSTRING_IID);
+ data = aString.getData();
+ if (MODEL_FLAVOR.equals(dragTransferData.getFlavor())) {
+ aFlavor = dragTransferData.getFlavor();
+ } else {
+ aFlavor = DndUtil.kURLMime;
+ }
+ }
- // if (object.getFileType() == XModelObject.FILE
- // && !TLDUtil.isTaglib(object)) {
- // flavor = "application/x-moz-file"; //$NON-NLS-1$
- // IFile f = (IFile) EclipseResourceUtil.getResource(object);
- // try {
- // data = f.getLocation().toFile().toURL().toString();
- // } catch (Exception e) {
- // VpePlugin.getPluginLog().logError(e);
- // }
- // } else {
- // String tagname = getTagName(object);
- // if (tagname.indexOf("taglib") >= 0)tagname = "taglib"; //$NON-NLS-1$ //$NON-NLS-2$
- // Node sourceDragNode = ((Document) getModel().getAdapter(
- // Document.class)).createElement(tagname);
- // if (visualDropInfo.getDropContainer() != null) {
- // sourceDropInfo = visualBuilder.getSourceInnerDropInfo(
- // sourceDragNode, visualDropInfo, true);
- // range = selectionBuilder.getSourceSelectionRange(
- // sourceDropInfo.getContainer(), sourceDropInfo
- // .getOffset());
- // }
- // }
+ // if (object.getFileType() == XModelObject.FILE
+ // && !TLDUtil.isTaglib(object)) {
+ // flavor = "application/x-moz-file"; //$NON-NLS-1$
+ // IFile f = (IFile) EclipseResourceUtil.getResource(object);
+ // try {
+ // data = f.getLocation().toFile().toURL().toString();
+ // } catch (Exception e) {
+ // VpePlugin.getPluginLog().logError(e);
+ // }
+ // } else {
+ // String tagname = getTagName(object);
+ // if (tagname.indexOf("taglib") >= 0)tagname = "taglib"; //$NON-NLS-1$ //$NON-NLS-2$
+ // Node sourceDragNode = ((Document) getModel().getAdapter(
+ // Document.class)).createElement(tagname);
+ // if (visualDropInfo.getDropContainer() != null) {
+ // sourceDropInfo = visualBuilder.getSourceInnerDropInfo(
+ // sourceDragNode, visualDropInfo, true);
+ // range = selectionBuilder.getSourceSelectionRange(
+ // sourceDropInfo.getContainer(), sourceDropInfo
+ // .getOffset());
+ // }
+ // }
- if (visualDropInfo.getDropContainer() != null && data != null) {
- if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
- System.out.println(" drop! container: " + visualDropInfo.getDropContainer().getNodeName()); //$NON-NLS-1$
- }
- externalDropAny(aFlavor, data, range,null);
+ if (visualDropInfo.getDropContainer() != null && data != null) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
+ System.out
+ .println(" drop! container: " + visualDropInfo.getDropContainer().getNodeName()); //$NON-NLS-1$
+ }
+ externalDropAny(aFlavor, data, range, null);
- // TypedEvent tEvent = new TypedEvent(mouseEvent);
- // tEvent.data = data;
- // dropContext.setFlavor(aFlavor);
- // dropContext.setMimeData(data);
- // DnDUtil.fireDnDEvent(dropContext, textEditor, tEvent);
- }
- }
+ // TypedEvent tEvent = new TypedEvent(mouseEvent);
+ // tEvent.data = data;
+ // dropContext.setFlavor(aFlavor);
+ // dropContext.setMimeData(data);
+ // DnDUtil.fireDnDEvent(dropContext, textEditor, tEvent);
+ }
+ }
public void onShowTooltip(int x, int y, final String text) {
@@ -2525,16 +2631,15 @@
public VpeIncludeList getIncludeList() {
if (includeList == null)
- VpePlugin.getPluginLog().logError("includeList - NULL!!!"); //$NON-NLS-1$
+ VpePlugin.getPluginLog().logError("includeList - NULL!!!"); //$NON-NLS-1$
return includeList;
}
-
+
/**
- * Processed selection events from source editor,
- * if reason of selection is visial editor,
- * selection will be stopped processing by
- * this condition (!switcher.startActiveEditor)
+ * Processed selection events from source editor, if reason of selection is
+ * visial editor, selection will be stopped processing by this condition
+ * (!switcher.startActiveEditor)
*/
public void selectionChanged(SelectionChangedEvent event) {
if (selectionBar != null)
@@ -2551,13 +2656,15 @@
toolbarFormatControllerManager.selectionChanged();
}
- if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
+ if (!switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
return;
}
try {
-
+
if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
- System.out.println(">>>>>>>>>>>>>> selectionChanged " + event.getSource()); //$NON-NLS-1$
+ System.out
+ .println(">>>>>>>>>>>>>> selectionChanged " + event.getSource()); //$NON-NLS-1$
}
sourceSelectionChanged();
} finally {
@@ -2566,7 +2673,8 @@
}
// nsIClipboardDragDropHooks implementation
- public void onPasteOrDrop(nsIDOMMouseEvent mouseEvent, String flavor, String data) {
+ public void onPasteOrDrop(nsIDOMMouseEvent mouseEvent, String flavor,
+ String data) {
onHideTooltip();
VpeVisualInnerDropInfo visualDropInfo = selectionBuilder
@@ -2592,7 +2700,8 @@
if (visualDropInfo.getDropContainer() != null) {
if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
- System.out.println(" drop! container: " + visualDropInfo.getDropContainer().getNodeName()); //$NON-NLS-1$
+ System.out
+ .println(" drop! container: " + visualDropInfo.getDropContainer().getNodeName()); //$NON-NLS-1$
}
final String finalFlavor = flavor;
final String finalData = data;
@@ -2711,15 +2820,16 @@
}
return changeEvents;
}
- public void reinit(){
- if(reinitJob!=null) {
+
+ public void reinit() {
+ if (reinitJob != null) {
reinitJob.cancel();
}
reinitJob = new UIJob(VpeUIMessages.VPE_VISUAL_REFRESH_JOB) {
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
- if(monitor.isCanceled()) {
+ if (monitor.isCanceled()) {
return Status.CANCEL_STATUS;
}
reinitImpl();
@@ -2731,9 +2841,10 @@
private void reinitImpl() {
try {
- if(switcher==null ||
- !switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
- return;
+ if (switcher == null
+ || !switcher
+ .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
+ return;
}
// this method must be invoked before any visual
@@ -2741,7 +2852,7 @@
visualEditor.reinitDesignMode();
visualBuilder.setSelectionRectangle(null);
- visualEditor.setEditorDomEventListener(this);
+ visualEditor.setEditorDomEventListener(this);
IDOMModel sourceModel = (IDOMModel) getModel();
if (sourceModel != null) {
IDOMDocument sourceDocument = sourceModel.getDocument();
@@ -2749,29 +2860,33 @@
} else {
visualBuilder.rebuildDom(null);
}
- //reinits selection controller+ controller
- visualSelectionController = new VpeSelectionController(visualEditor.getEditor().getSelectionController());
-
- selectionBuilder = new VpeSelectionBuilder(domMapping, sourceBuilder,
- visualBuilder, visualSelectionController);
-
- selectionManager = new SelectionManager(pageContext,
- sourceEditor, visualSelectionController);
-
+ // reinits selection controller+ controller
+ visualSelectionController = new VpeSelectionController(visualEditor
+ .getEditor().getSelectionController());
+
+ selectionBuilder = new VpeSelectionBuilder(domMapping,
+ sourceBuilder, visualBuilder, visualSelectionController);
+
+ selectionManager = new SelectionManager(pageContext, sourceEditor,
+ visualSelectionController);
+
keyEventHandler = new KeyEventManager(sourceEditor, domMapping,
pageContext);
- //restore selection in visula part
+ float currentZoom = zoomEventManager.getCurrentZoom();
+ zoomEventManager = new ZoomEventManager(getXulRunnerEditor());
+ zoomEventManager.setCurrentZoom(currentZoom);
+ ((KeyEventManager)keyEventHandler).setZoomEventManager(zoomEventManager);
+ // restore selection in visula part
sourceSelectionChanged();
- }catch(VpeDisposeException ex) {
- //vpe vas closed when refresh job is running, so just
- //ignore this exception
- }
- finally {
- if(switcher!=null) {
+ } catch (VpeDisposeException ex) {
+ // vpe vas closed when refresh job is running, so just
+ // ignore this exception
+ } finally {
+ if (switcher != null) {
switcher.stopActiveEditor();
}
}
-
+
}
/**
@@ -2780,7 +2895,7 @@
public VpeSelectionController getVisualSelectionController() {
return visualSelectionController;
}
-
+
/**
*
* @return sourceBuilder
@@ -2788,7 +2903,7 @@
public VpeSourceDomBuilder getSourceBuilder() {
return sourceBuilder;
}
-
+
/**
*
* @return visualBuilder
@@ -2805,7 +2920,8 @@
}
/**
- * @param vpeUpdateDelayTime the vpeUpdateDelayTime to set
+ * @param vpeUpdateDelayTime
+ * the vpeUpdateDelayTime to set
*/
private void setVpeUpdateDelayTime(int vpeUpdateDelayTime) {
this.vpeUpdateDelayTime = vpeUpdateDelayTime;
@@ -2817,12 +2933,21 @@
public ISelectionManager getSelectionManager() {
return selectionManager;
}
-
+
/*
- * https://jira.jboss.org/jira/browse/JBIDE-4968
- * Updating VPE toolbar on selection bar changes.
+ * https://jira.jboss.org/jira/browse/JBIDE-4968 Updating VPE toolbar on
+ * selection bar changes.
*/
public void updateVpeToolbar() {
visualEditor.updateShowSelectionBarItem(selectionBar.isVisible());
}
+
+ public IZoomEventManager getZoomEventManager() {
+ return zoomEventManager;
+ }
+
+ public void setZoomEventManager(IZoomEventManager zoomEventManager) {
+ this.zoomEventManager = zoomEventManager;
+ }
+
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/VpeMenuCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/VpeMenuCreator.java 2009-11-17 18:59:50 UTC (rev 18721)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/VpeMenuCreator.java 2009-11-17 19:13:46 UTC (rev 18722)
@@ -23,6 +23,7 @@
import org.eclipse.ui.texteditor.AbstractTextEditor;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.vpe.VpeDebug;
+import org.jboss.tools.vpe.editor.VpeEditorPart;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
import org.jboss.tools.vpe.editor.menu.action.EditAttributesAction;
@@ -30,6 +31,7 @@
import org.jboss.tools.vpe.editor.menu.action.StripTagAction;
import org.jboss.tools.vpe.editor.menu.action.ComplexAction;
import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
+import org.jboss.tools.vpe.editor.template.IZoomEventManager;
import org.jboss.tools.vpe.editor.util.SelectionUtil;
import org.jboss.tools.vpe.messages.VpeUIMessages;
import org.jboss.tools.vpe.xulrunner.browser.util.DOMTreeDumper;
@@ -39,8 +41,7 @@
/**
* This class is used to create context menu for VPE.
*
- * @author yradtsevich
- * (based on the implementation of MenuCreationHelper)
+ * @author yradtsevich (based on the implementation of MenuCreationHelper)
*/
public class VpeMenuCreator {
private final MenuManager menuManager;
@@ -63,9 +64,10 @@
/**
* Inserts new menu items into {@link #menuManager}.
*
- * @param topLevelMenu if it is {@code true} then the menu will contain
- * elements for the top level variant of the VPE menu, otherwise - elements
- * for the sub menu variant.
+ * @param topLevelMenu
+ * if it is {@code true} then the menu will contain elements for
+ * the top level variant of the VPE menu, otherwise - elements
+ * for the sub menu variant.
*
* @see #addParentTagMenuItem(Element)
*/
@@ -86,8 +88,11 @@
menuManager.add(new InsertContributionItem(node));
addIfEnabled(new StripTagAction(node));
addSeparator();
-
if (topLevelMenu) {
+ addZoomActions();
+ }
+ addSeparator();
+ if (topLevelMenu) {
addIfEnabled(new DumpSourceAction());
addIfEnabled(new DumpSelectedElementAction());
addIfEnabled(new DumpMappingAction());
@@ -98,7 +103,7 @@
}
/**
- * Creates the Cut, Copy and Paste actions.
+ * Creates the Cut, Copy and Paste actions.
*/
private void addCutCopyPasteActions(boolean topLevelMenu) {
final IAction cutAction = getSourceEditorAction(ActionFactory.CUT);
@@ -118,14 +123,13 @@
menuManager.add(new ComplexAction(copyAction.getText(),
selectAction, copyAction));
menuManager.add(new ComplexAction(pasteAction.getText(),
- selectAction, pasteAction));
+ selectAction, pasteAction));
}
}
}
/**
- * If the {@code action} is enabled, adds it to
- * the {@link #menuManager}.
+ * If the {@code action} is enabled, adds it to the {@link #menuManager}.
*/
private void addIfEnabled(IAction action) {
if (action.isEnabled()) {
@@ -136,7 +140,8 @@
/**
* Adds a menu item for operations on {@code parent} element.
*
- * @param parent the parent element
+ * @param parent
+ * the parent element
*/
private void addParentTagMenuItem(final Element parent) {
final String itemName = MessageFormat.format(
@@ -155,8 +160,8 @@
}
/**
- * Adds a separator. If {@link #menuManager} is empty or the last
- * item already is a separator, does nothing.
+ * Adds a separator. If {@link #menuManager} is empty or the last item
+ * already is a separator, does nothing.
*/
private void addSeparator() {
final int size = menuManager.getSize();
@@ -170,9 +175,10 @@
/**
* Returns an action of the source editor.
- *
- * @param actionFactory instance of {@link ActionFactory}
- * which identifies the action of the item.
+ *
+ * @param actionFactory
+ * instance of {@link ActionFactory} which identifies the action
+ * of the item.
*/
private IAction getSourceEditorAction(final ActionFactory actionFactory) {
final AbstractTextEditor sourceEditor = vpeMenuUtil.getSourceEditor();
@@ -180,7 +186,6 @@
return action;
}
-
/**
* Test action. For the debugging purposes only.
*/
@@ -198,10 +203,9 @@
return VpeDebug.VISUAL_CONTEXTMENU_TEST;
}
}
-
+
/**
- * Action to dump source of VPE.
- * For debugging purposes only.
+ * Action to dump source of VPE. For debugging purposes only.
*/
public class DumpSourceAction extends Action {
public DumpSourceAction() {
@@ -210,12 +214,11 @@
@Override
public void run() {
- final MozillaEditor visualEditor
- = vpeMenuUtil.getMozillaEditor();
+ final MozillaEditor visualEditor = vpeMenuUtil.getMozillaEditor();
DOMTreeDumper dumper = new DOMTreeDumper(
VpeDebug.VISUAL_DUMP_PRINT_HASH);
- dumper.setIgnoredAttributes(
- VpeDebug.VISUAL_DUMP_IGNORED_ATTRIBUTES);
+ dumper
+ .setIgnoredAttributes(VpeDebug.VISUAL_DUMP_IGNORED_ATTRIBUTES);
dumper.dumpToStream(System.out, visualEditor.getDomDocument());
}
@@ -226,8 +229,8 @@
}
/**
- * Action to dump source of the selected VPE element.
- * For debugging purposes only.
+ * Action to dump source of the selected VPE element. For debugging purposes
+ * only.
*/
public class DumpSelectedElementAction extends Action {
public DumpSelectedElementAction() {
@@ -236,18 +239,16 @@
@Override
public void run() {
- final StructuredTextEditor sourceEditor
- = vpeMenuUtil.getSourceEditor();
- final VpeDomMapping domMapping
- = vpeMenuUtil.getDomMapping();
- final VpeNodeMapping nodeMapping
- = SelectionUtil.getNodeMappingBySourceSelection(
- sourceEditor, domMapping);
+ final StructuredTextEditor sourceEditor = vpeMenuUtil
+ .getSourceEditor();
+ final VpeDomMapping domMapping = vpeMenuUtil.getDomMapping();
+ final VpeNodeMapping nodeMapping = SelectionUtil
+ .getNodeMappingBySourceSelection(sourceEditor, domMapping);
if (nodeMapping != null) {
DOMTreeDumper dumper = new DOMTreeDumper(
VpeDebug.VISUAL_DUMP_PRINT_HASH);
- dumper.setIgnoredAttributes(
- VpeDebug.VISUAL_DUMP_IGNORED_ATTRIBUTES);
+ dumper
+ .setIgnoredAttributes(VpeDebug.VISUAL_DUMP_IGNORED_ATTRIBUTES);
dumper.dumpNode(nodeMapping.getVisualNode());
}
}
@@ -257,10 +258,9 @@
return VpeDebug.VISUAL_CONTEXTMENU_DUMP_SELECTED_ELEMENT;
}
}
-
+
/**
- * Action to print the {@link #domMapping}.
- * For debugging purposes only.
+ * Action to print the {@link #domMapping}. For debugging purposes only.
*/
public class DumpMappingAction extends Action {
public DumpMappingAction() {
@@ -269,8 +269,7 @@
@Override
public void run() {
- final VpeDomMapping domMapping
- = vpeMenuUtil.getDomMapping();
+ final VpeDomMapping domMapping = vpeMenuUtil.getDomMapping();
domMapping.printMapping();
}
@@ -279,4 +278,12 @@
return VpeDebug.VISUAL_CONTEXTMENU_DUMP_MAPPING;
}
}
+
+ private void addZoomActions() {
+ IZoomEventManager zoomEventManager = ((VpeEditorPart) vpeMenuUtil
+ .getEditor().getVisualEditor()).getController()
+ .getZoomEventManager();
+ ZoomActionMenuManager manager = new ZoomActionMenuManager(zoomEventManager);
+ menuManager.add(manager);
+ }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/VpeMenuUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/VpeMenuUtil.java 2009-11-17 18:59:50 UTC (rev 18721)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/VpeMenuUtil.java 2009-11-17 19:13:46 UTC (rev 18722)
@@ -32,6 +32,10 @@
* @author yradtsevich
*/
public class VpeMenuUtil {
+
+ public static final String ICON_MENU_ZOOM_IN = "icons/menu/zoom_in.png"; //$NON-NLS-1$
+ public static final String ICON_MENU_ZOOM_OUT = "icons/menu/zoom_out.png"; //$NON-NLS-1$
+
private JSPMultiPageEditor editor;
private boolean editorInitialized = false;
private StructuredTextEditor sourceEditor;
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/ZoomActionMenuManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/ZoomActionMenuManager.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/ZoomActionMenuManager.java 2009-11-17 19:13:46 UTC (rev 18722)
@@ -0,0 +1,70 @@
+package org.jboss.tools.vpe.editor.menu;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
+import org.jboss.tools.vpe.editor.template.IZoomEventManager;
+
+public class ZoomActionMenuManager extends MenuManager {
+
+ private static final String ZOOM_MENU = "Zoom"; //$NON-NLS-1$
+ private static final String ZOOM_IN = "Zoom In\tCtrl++"; //$NON-NLS-1$
+ private static final String ZOOM_OUT = "Zoom Out\tCtrl+-"; //$NON-NLS-1$
+ private static final String RESET = "Reset\tCtrl+0"; //$NON-NLS-1$
+ private IZoomEventManager manager;
+
+ public ZoomActionMenuManager(IZoomEventManager manager) {
+ super(ZOOM_MENU);
+ this.manager = manager;
+ add(new ZoomInAcion());
+ add(new ZoomOutAction());
+ add(new Separator());
+ add(new ResetZoomViewAction());
+ }
+
+ private class ZoomInAcion extends Action {
+
+ public ZoomInAcion() {
+ setText(ZOOM_IN);
+ setImageDescriptor(ImageDescriptor.createFromFile(
+ MozillaEditor.class, VpeMenuUtil.ICON_MENU_ZOOM_IN));
+ }
+
+ @Override
+ public void run() {
+ manager.zoomIn();
+ }
+
+ }
+
+ private class ZoomOutAction extends Action {
+
+ public ZoomOutAction() {
+ setText(ZOOM_OUT);
+ setImageDescriptor(ImageDescriptor.createFromFile(
+ MozillaEditor.class, VpeMenuUtil.ICON_MENU_ZOOM_OUT));
+ }
+
+ @Override
+ public void run() {
+ manager.zoomOut();
+ }
+
+ }
+
+ private class ResetZoomViewAction extends Action {
+
+ public ResetZoomViewAction() {
+ setText(RESET);
+ }
+
+ @Override
+ public void run() {
+ manager.resetZoomView();
+ }
+
+ }
+
+}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/IZoomEventManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/IZoomEventManager.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/IZoomEventManager.java 2009-11-17 19:13:46 UTC (rev 18722)
@@ -0,0 +1,31 @@
+package org.jboss.tools.vpe.editor.template;
+
+import org.mozilla.interfaces.nsIDOMKeyEvent;
+
+public interface IZoomEventManager {
+
+ long ZOOM_IN_CH_CODE = nsIDOMKeyEvent.DOM_VK_EQUALS;
+
+ long ZOOM_OUT_CH_CODE = 45L;
+
+ long ZOOM_RESET_CH_CODE = nsIDOMKeyEvent.DOM_VK_0;
+
+ boolean zoomIn();
+
+ boolean zoomOut();
+
+ boolean resetZoomView();
+
+ float getCurrentZoom();
+
+ boolean setCurrentZoom(float zoomValue);
+
+ float getMinZoom();
+
+ float getMaxZoom();
+
+ float getBasicZoom();
+
+ float[] getAvailableZoomValues();
+
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java 2009-11-17 18:59:50 UTC (rev 18721)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java 2009-11-17 19:13:46 UTC (rev 18722)
@@ -52,7 +52,9 @@
* page context
*/
private VpePageContext pageContext;
-
+
+ private IZoomEventManager zoomEventManager;
+
/**
*
*
@@ -67,6 +69,7 @@
this.sourceEditor = sourceEditor;
this.domMapping = domMapping;
this.pageContext = pageContext;
+ this.zoomEventManager = pageContext.getEditPart().getVisualEditor().getController().getZoomEventManager();
}
final public boolean handleKeyPress(nsIDOMKeyEvent keyEvent) {
@@ -76,6 +79,18 @@
if (keyCode == nsIDOMKeyEvent.DOM_VK_ENTER) {
return handleEnter(keyEvent);
+ } else if (keyEvent.getCtrlKey()
+ && (keyEvent.getCharCode() == IZoomEventManager.ZOOM_IN_CH_CODE)) {
+ return handleZoomInEvent(keyEvent);
+
+ } else if (keyEvent.getCtrlKey()
+ && (keyEvent.getCharCode() == IZoomEventManager.ZOOM_OUT_CH_CODE)) {
+ return handleZoomOutEvent(keyEvent);
+
+ } else if (keyEvent.getCtrlKey()
+ && (keyEvent.getCharCode() == IZoomEventManager.ZOOM_RESET_CH_CODE)) {
+ return handleResetZoomView(keyEvent);
+
} else if ((keyCode == nsIDOMKeyEvent.DOM_VK_LEFT)
&& (!keyEvent.getShiftKey())) {
return handleLeft(keyEvent);
@@ -118,8 +133,8 @@
} else if ((keyEvent.getKeyCode() == nsIDOMKeyEvent.DOM_VK_INSERT)
&& keyEvent.getShiftKey()) {
return handleInsert(keyEvent);
+
}
-
return false;
}
@@ -262,7 +277,7 @@
return true;
}
-
+
editable = nodeData.isEditable()
&& !isBorderPosition(
nodeData.getSourceNode(),
@@ -288,9 +303,9 @@
if (editable) {
- Point range = SelectionUtil
- .getSourceSelectionRange(getSourceEditor());
-
+ Point range = SelectionUtil
+ .getSourceSelectionRange(getSourceEditor());
+
if (range.y == 0) {
int offset = getEscOffset(visibleSourceNode, range, delete);
if (offset != 0)
@@ -304,6 +319,18 @@
return true;
}
+ private boolean handleZoomInEvent(nsIDOMKeyEvent keyEvent) {
+ return zoomEventManager.zoomIn();
+ }
+
+ private boolean handleZoomOutEvent(nsIDOMKeyEvent keyEvent) {
+ return zoomEventManager.zoomOut();
+ }
+
+ private boolean handleResetZoomView(nsIDOMKeyEvent keyEvent) {
+ return zoomEventManager.resetZoomView();
+ }
+
/**
* Default handling of a pressing the "end" event - always return false.
*
@@ -458,11 +485,11 @@
}
return false;
}
-
+
private int getEscOffset(Node visibleNode, Point selectionRange, int delete) {
int offset = 0;
-
+
if (delete == ST.DELETE_NEXT) {
offset = TextUtil.checkEscToRight(NodesManagingUtil
.getSourceText(visibleNode), selectionRange.x
@@ -476,4 +503,13 @@
return offset;
}
+
+ public IZoomEventManager getZoomEventManager() {
+ return zoomEventManager;
+ }
+
+ public void setZoomEventManager(IZoomEventManager zoomManager) {
+ this.zoomEventManager = zoomManager;
+ }
+
}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/ZoomEventManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/ZoomEventManager.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/ZoomEventManager.java 2009-11-17 19:13:46 UTC (rev 18722)
@@ -0,0 +1,144 @@
+package org.jboss.tools.vpe.editor.template;
+
+import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
+import org.mozilla.interfaces.nsIContentViewer;
+import org.mozilla.interfaces.nsIDOMAbstractView;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMDocumentView;
+import org.mozilla.interfaces.nsIDocShell;
+import org.mozilla.interfaces.nsIInterfaceRequestor;
+import org.mozilla.interfaces.nsIMarkupDocumentViewer;
+import org.mozilla.interfaces.nsIWebNavigation;
+
+public class ZoomEventManager implements IZoomEventManager{
+
+ private final float basicZoom = 1f;
+ private final float minZoom = 0.3f;
+ private final float maxZoom = 4f;
+ private float[] availableZoomValues;
+ private int currentZoomPos = 5;
+ private final float decreaseValue = 0.14f;
+ private final float increaseValue = 0.375f;
+ private nsIMarkupDocumentViewer documentViewer;
+
+ public ZoomEventManager(XulRunnerEditor editor) {
+ availableZoomValues = new float[14];
+ availableZoomValues[0] = minZoom;
+ availableZoomValues[13] = maxZoom;
+ availableZoomValues[5] = basicZoom;
+ for (int i = 1; i < 5; i++) {
+ availableZoomValues[i] = availableZoomValues[i - 1] + decreaseValue;
+ }
+ for (int i = 6; i < 13; i++) {
+ availableZoomValues[i] = availableZoomValues[i - 1] + increaseValue;
+ }
+ documentViewer = initMarkupViewer(editor);
+ }
+
+ public boolean zoomIn() {
+ if (documentViewer != null) {
+ if (availableZoomValues[currentZoomPos] == maxZoom) {
+ return false;
+ }
+ currentZoomPos++;
+ documentViewer.setFullZoom(availableZoomValues[currentZoomPos]);
+ return true;
+ }
+ return false;
+ }
+
+ public boolean zoomOut() {
+ if (documentViewer != null) {
+ if (availableZoomValues[currentZoomPos] == minZoom) {
+ return false;
+ }
+ currentZoomPos--;
+ documentViewer.setFullZoom(availableZoomValues[currentZoomPos]);
+ return true;
+ }
+ return false;
+ }
+
+ public boolean resetZoomView() {
+ if (documentViewer != null) {
+ currentZoomPos = 5;
+ documentViewer.setFullZoom(availableZoomValues[currentZoomPos]);
+ return true;
+ }
+ return false;
+ }
+
+ public boolean setCurrentZoom(float zoomValue) {
+ if (documentViewer != null) {
+ currentZoomPos = searchNearestPos(zoomValue);
+ documentViewer.setFullZoom(availableZoomValues[currentZoomPos]);
+ }
+ return false;
+ }
+
+ public float getCurrentZoom() {
+ return availableZoomValues[currentZoomPos];
+ }
+
+ @Override
+ public float getMaxZoom() {
+ return minZoom;
+ }
+
+ @Override
+ public float getMinZoom() {
+ return maxZoom;
+ }
+
+ private int searchNearestPos(float zoomValue){
+ for (int i = 0; i < 5; i++) {
+ if (zoomValue < availableZoomValues[i]+decreaseValue/2) {
+ return i;
+ }
+ if (zoomValue <= availableZoomValues[i+1]) {
+ return i+1;
+ }
+ }
+ for (int i = 5; i < availableZoomValues.length-1; i++) {
+ if (zoomValue < availableZoomValues[i]+increaseValue/2) {
+ return i;
+ }
+ if (zoomValue <= availableZoomValues[i+1]) {
+ return i+1;
+ }
+ }
+ return currentZoomPos;
+ }
+
+ @Override
+ public float getBasicZoom() {
+ return basicZoom;
+ }
+
+ @Override
+ public float[] getAvailableZoomValues() {
+ return availableZoomValues;
+ }
+
+ private nsIMarkupDocumentViewer initMarkupViewer(XulRunnerEditor editor) {
+ try {
+ nsIDOMDocument document = editor.getDOMDocument();
+ nsIDOMDocumentView documentView = (nsIDOMDocumentView) document
+ .queryInterface(nsIDOMDocumentView.NS_IDOMDOCUMENTVIEW_IID);
+ nsIDOMAbstractView abstractView = documentView.getDefaultView();
+ nsIInterfaceRequestor requestor = (nsIInterfaceRequestor) abstractView
+ .queryInterface(nsIInterfaceRequestor.NS_IINTERFACEREQUESTOR_IID);
+ nsIWebNavigation navigation = (nsIWebNavigation) requestor
+ .getInterface(nsIWebNavigation.NS_IWEBNAVIGATION_IID);
+ nsIDocShell docShell = (nsIDocShell) navigation
+ .queryInterface(nsIDocShell.NS_IDOCSHELL_IID);
+ nsIContentViewer contentViewer = docShell.getContentViewer();
+ nsIMarkupDocumentViewer markupDocumentViewer = (nsIMarkupDocumentViewer) contentViewer
+ .queryInterface(nsIMarkupDocumentViewer.NS_IMARKUPDOCUMENTVIEWER_IID);
+ return markupDocumentViewer;
+ } catch (NullPointerException e) {
+ return null;
+ }
+ }
+
+}
15 years, 1 month
JBoss Tools SVN: r18721 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF and 19 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-11-17 13:59:50 -0500 (Tue, 17 Nov 2009)
New Revision: 18721
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe.html/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe.jsp/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.html.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.jsp.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF
Log:
switch from Require-Bundle: 1.9.1 to Import-Package [1.9.1,2.0.0)
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -9,10 +9,10 @@
org.eclipse.ui,
org.eclipse.core.runtime,
org.jboss.tools.jst.jsp,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.jsf.vpe.richfaces;bundle-version="2.1.0",
org.jboss.tools.jsf.vpe.jsf;bundle-version="2.1.0",
org.eclipse.jface.text;bundle-version="3.5.0"
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -13,9 +13,9 @@
org.jboss.tools.vpe,
org.eclipse.core.resources,
org.jboss.tools.jst.jsp,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.eclipse.jface.text;bundle-version="3.5.0"
Export-Package: org.jboss.tools.jsf.vpe.facelets,
org.jboss.tools.jsf.vpe.facelets.template
Bundle-Version: 2.1.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -9,7 +9,6 @@
org.eclipse.core.runtime,
org.jboss.tools.common,
org.jboss.tools.vpe,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.jst.web,
org.jboss.tools.jst.jsp,
org.eclipse.wst.sse.core,
@@ -26,5 +25,6 @@
org.jboss.tools.jsf.vpe.jsf.template.util.model
Bundle-Localization: plugin
Import-Package: org.eclipse.wst.sse.ui,
- org.jboss.tools.jst.web.tld
+ org.jboss.tools.jst.web.tld,
+ org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -9,7 +9,6 @@
org.eclipse.core.runtime,
org.jboss.tools.common,
org.jboss.tools.vpe,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.jst.jsp,
org.eclipse.wst.sse.core,
org.eclipse.jst.jsp.core,
@@ -19,5 +18,6 @@
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.jsf.vpe.jstl.template
Bundle-Localization: plugin
-Import-Package: org.jboss.tools.jst.web.tld
+Import-Package: org.jboss.tools.jst.web.tld,
+ org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.myfaces/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -9,7 +9,6 @@
org.eclipse.core.runtime,
org.jboss.tools.common,
org.jboss.tools.vpe,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.jst.jsp,
org.eclipse.jface.text;bundle-version="3.5.0"
Bundle-ActivationPolicy: lazy
@@ -18,3 +17,4 @@
Bundle-ClassPath: jsf-vpe-myfaces.jar
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -13,7 +13,6 @@
org.eclipse.wst.sse.ui,
org.eclipse.ui.workbench.texteditor,
org.eclipse.ui.ide,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.eclipse.wst.sse.core,
org.jboss.tools.vpe.xulrunner
Bundle-ActivationPolicy: lazy
@@ -23,3 +22,4 @@
Export-Package: org.jboss.tools.jsf.vpe.richfaces,
org.jboss.tools.jsf.vpe.richfaces.template.util
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -13,7 +13,6 @@
org.eclipse.wst.sse.ui,
org.eclipse.ui.workbench.texteditor,
org.eclipse.ui.ide,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.jsf.vpe.jsf;bundle-version="2.1.0",
org.eclipse.jface.text;bundle-version="3.5.0"
Bundle-Vendor: %Bundle-Vendor.0
@@ -21,3 +20,4 @@
Bundle-ClassPath: lib/antlr.jar,
.
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -17,7 +17,6 @@
org.jboss.tools.common.model,
org.jboss.tools.vpe.xulrunner,
org.jboss.tools.jsf.vpe.ajax4jsf,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.vpe.ui.test,
org.jboss.tools.vpe.resref;bundle-version="2.0.0",
org.jboss.tools.common.el.ui;bundle-version="1.0.0",
@@ -27,3 +26,4 @@
Export-Package: org.jboss.tools.jsf.vpe.ajax4jsf.test
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -15,11 +15,11 @@
org.jboss.tools.vpe.ui.test,
org.jboss.tools.jst.jsp,
org.jboss.tools.jst.web,
- org.jboss.tools.vpe.xulrunner,
- org.mozilla.xpcom;bundle-version="1.9.1"
+ org.jboss.tools.vpe.xulrunner
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.jsf.vpe.facelets.test
Bundle-ClassPath: facelets-tests.jar
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -15,7 +15,6 @@
org.jboss.tools.common.text.ext,
org.jboss.tools.common.model,
org.jboss.tools.vpe.xulrunner,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.vpe.ui.test;visibility:=reexport,
org.eclipse.jface.text,
org.jboss.tools.jsf.vpe.jsf,
@@ -34,7 +33,4 @@
Export-Package: org.jboss.tools.jsf.vpe.jsf.test
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
-
-
-
-
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -18,7 +18,6 @@
org.jboss.tools.common.model,
org.jboss.tools.vpe.xulrunner,
org.jboss.tools.jsf.vpe.richfaces,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.vpe.ui.test,
org.jboss.tools.vpe.resref;bundle-version="2.0.0",
org.jboss.tools.common.el.ui;bundle-version="1.0.0",
@@ -29,3 +28,4 @@
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -13,11 +13,11 @@
org.jboss.tools.common,
org.jboss.tools.vpe.ui.test,
org.jboss.tools.jst.jsp,
- org.jboss.tools.vpe.xulrunner,
- org.mozilla.xpcom;bundle-version="1.9.1"
+ org.jboss.tools.vpe.xulrunner
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: vpe-seam-test.jar
Export-Package: org.jboss.tools.jsf.vpe.seam.test
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -49,7 +49,6 @@
org.eclipse.ui.views,
org.eclipse.ui.ide,
org.jboss.tools.vpe.xulrunner,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.eclipse.draw2d,
org.jboss.tools.jst.web;visibility:=reexport,
org.jboss.tools.vpe.resref,
@@ -63,3 +62,4 @@
org.jboss.tools.common.model.ui;bundle-version="2.0.0"
Bundle-Version: 2.1.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -8,7 +8,6 @@
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.jboss.tools.vpe,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.jst.jsp,
org.jboss.tools.common,
org.eclipse.jface.text;bundle-version="3.5.0"
@@ -16,3 +15,4 @@
Bundle-Localization: plugin
Export-Package: org.jboss.tools.vpe.html.template
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.jsp/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.jsp/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.jsp/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -8,10 +8,10 @@
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.jboss.tools.vpe,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.eclipse.core.resources,
org.jboss.tools.jst.jsp,
org.jboss.tools.common
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -6,7 +6,6 @@
Bundle-Activator: org.jboss.tools.vpe.xulrunner.BrowserPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.common
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.vpe.xulrunner;uses:="org.eclipse.jface.resource,org.eclipse.ui.plugin,org.osgi.framework",
@@ -17,3 +16,5 @@
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)",
+ org.mozilla.interfaces;version="[1.9.1,2.0.0)"
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -16,10 +16,10 @@
org.jboss.tools.common.text.ext,
org.jboss.tools.common.model,
org.jboss.tools.vpe.xulrunner,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.vpe.ui.test
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: html-test.jar
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/vpe/tests/org.jboss.tools.vpe.jsp.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.jsp.test/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/vpe/tests/org.jboss.tools.vpe.jsp.test/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -13,11 +13,11 @@
org.jboss.tools.common,
org.jboss.tools.vpe.ui.test,
org.jboss.tools.jst.jsp,
- org.jboss.tools.vpe.xulrunner,
- org.mozilla.xpcom;bundle-version="1.9.1"
+ org.jboss.tools.vpe.xulrunner
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.vpe.jsp.test
Bundle-ClassPath: jsp-tests.jar
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -19,7 +19,6 @@
org.jboss.tools.common.text.ext;bundle-version="2.0.0",
org.jboss.tools.jst.web;bundle-version="2.0.0",
org.hamcrest;bundle-version="1.1.0",
- org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.vpe.xulrunner;bundle-version="2.1.0",
org.eclipse.jface.text;bundle-version="3.5.0",
org.jboss.tools.jst.jsp;bundle-version="2.0.0",
@@ -27,7 +26,7 @@
Eclipse-RegisterBuddy: org.apache.log4j
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: junit.framework
+Import-Package: junit.framework,
+ org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Export-Package: org.jboss.tools.vpe.ui.bot.test,
org.jboss.tools.vpe.ui.bot.test.jbide
-
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -16,7 +16,6 @@
org.jboss.tools.common.text.ext,
org.jboss.tools.common.model,
org.jboss.tools.vpe.xulrunner,
- org.mozilla.xpcom;bundle-version="1.9.1",
org.jboss.tools.jst.firstrun,
org.eclipse.wst.server.core,
org.eclipse.jface.text,
@@ -31,4 +30,5 @@
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.jboss.tools.vpe.resref.core
+Import-Package: org.jboss.tools.vpe.resref.core,
+ org.mozilla.xpcom;version="[1.9.1,2.0.0)"
Modified: trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF 2009-11-17 17:04:35 UTC (rev 18720)
+++ trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF 2009-11-17 18:59:50 UTC (rev 18721)
@@ -10,9 +10,9 @@
org.junit,
org.jboss.tools.common,
org.jboss.tools.vpe.xulrunner,
- org.mozilla.xpcom;bundle-version="1.9.1"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.vpe.xulrunner.test,
org.jboss.tools.vpe.xulrunner.view
Bundle-ClassPath: vpe-mozilla-tests.jar
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.mozilla.xpcom;version="[1.9.1,2.0.0)"
15 years, 1 month
JBoss Tools SVN: r18720 - trunk/hibernatetools/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-11-17 12:04:35 -0500 (Tue, 17 Nov 2009)
New Revision: 18720
Modified:
trunk/hibernatetools/docs/reference/en/modules/plugins.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-922, https://jira.jboss.org/jira/browse/JBDS-921 - updating the 'Mapping Diagram' section according to the changes made in the context menu and Keyboard navigation support added;
Modified: trunk/hibernatetools/docs/reference/en/modules/plugins.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2009-11-17 17:01:58 UTC (rev 18719)
+++ trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2009-11-17 17:04:35 UTC (rev 18720)
@@ -1942,79 +1942,137 @@
</imageobject>
</mediaobject>
</figure>
+
+ <para>The options in the context menu of the mapping diagram are listed in the next table.</para>
+
+ <table>
+ <title>Context Menu Options of the Mapping Diagram</title>
+
+ <tgroup cols="3">
+ <colspec colnum="1" align="left" colwidth="1*"/>
+ <colspec colnum="2" align="left" colwidth="1*"/>
+ <colspec colnum="3" align="left" colwidth="3*"/>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Icon</para>
+ </entry>
+
+ <entry align="center">
+ <para>Command</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para><inlinemediaobject><imageobject>
+ <imagedata fileref="images/plugins/toggleConnections.png"/>
+ </imageobject></inlinemediaobject>
+ </para>
+ </entry>
+ <entry>
+ <para>Show|Hide connections</para>
+ </entry>
+ <entry>
+ <para>Allows to select what types of connections should be shown on the diagram:
+ <itemizedlist>
+ <listitem><para>Property Mappings</para></listitem>
+ <listitem><para>Class Mappings</para></listitem>
+ <listitem><para>Associations</para></listitem>
+ <listitem><para>Foreign key constraints</para></listitem>
+ </itemizedlist>
+ and choose the type of the connection router:
+ <itemizedlist>
+ <listitem><para>Manhattan Connection Router</para></listitem>
+ <listitem><para>Fan Connection Router</para></listitem>
+ </itemizedlist>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><inlinemediaobject><imageobject>
+ <imagedata fileref="images/plugins/autoLayout.png"/>
+ </imageobject></inlinemediaobject>
+ </para>
+ </entry>
+ <entry>
+ <para>Auto layout</para>
+ </entry>
+ <entry>
+ <para>Used to dispose all the items of the diagram in a standard manner</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para></para>
+ </entry>
+ <entry>
+ <para>Collapse All</para>
+ </entry>
+ <entry>
+ <para>Collapses all the diagram elements</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para></para>
+ </entry>
+ <entry>
+ <para>Expand All</para>
+ </entry>
+ <entry>
+ <para>Expands all the diagram elements</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para></para>
+ </entry>
+ <entry>
+ <para>Select All</para>
+ </entry>
+ <entry>
+ <para>Makes all the diagram elements selected</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><inlinemediaobject><imageobject>
+ <imagedata fileref="images/plugins/exportAsImage.png"/>
+ </imageobject></inlinemediaobject>
+ </para>
+ </entry>
+ <entry>
+ <para>Export as Image</para>
+ </entry>
+ <entry>
+ <para>Allows to export a diagram as <emphasis><property>.png
+ </property>,</emphasis>
+ <emphasis>
+ <property>.jpeg</property>
+ </emphasis> or <emphasis><property>.bmp </property></emphasis></para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
- <para>As in <property>Hibernate Configurations View</property> in <property>Mapping
- Diagram</property> it's also possible to open source/mapping file for a chosen
- object by selecting appropriate option in the context menu. </para>
-
- <figure>
- <title>Navigating on the Diagram</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/plugins/plugins_18_c.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If you ask to open source/mapping file by right clicking on any entity element, this
- element will be highlighted in the open file.</para>
-
- <figure>
- <title>Opening Source for Object</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/plugins/plugins_18_d.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If you need to have your Diagram exported as <emphasis><property>.png
- </property>,</emphasis>
- <emphasis>
- <property>.jpeg</property>
- </emphasis> or <emphasis><property>.bmp </property>,</emphasis> you should right-click
- anywhere in the <property>Mapping Diagram editor</property> and select <emphasis>
- <property>Export as Image</property>
- </emphasis>.</para>
-
- <figure>
- <title>Mapping Diagram Export</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/plugins/plugins_18_e.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Using <emphasis>
- <property>Toggle connections</property></emphasis> option( <inlinemediaobject><imageobject>
- <imagedata fileref="images/plugins/toggleConnections.png"/>
- </imageobject></inlinemediaobject>) you can hide all the connections on the diagram except the ones,
- that connect POJO class to DB table.</para>
- <figure>
- <title>Toggle connections option usage</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/plugins/plugins_18_f.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para> <emphasis>
- <property>Auto layout</property></emphasis> ( <inlinemediaobject><imageobject>
- <imagedata fileref="images/plugins/autoLayout.png"/>
- </imageobject></inlinemediaobject>) is used to dispose all the items of the diagram in a standard manner.</para>
- <para>As you can see on the figure above, <emphasis><property>Collapse All</property>, </emphasis>
- <emphasis>
- <property>Expand All</property>
- </emphasis> and <emphasis>
- <property>Select All </property>
- </emphasis> options are also available through the context menu.</para>
<para>When you open the context menu while clicking an item on the diagram, it quite differs from the one described before.</para>
<figure>
- <title>Context menu in mapping item </title>
+ <title>Context Menu in Mapping Item</title>
<mediaobject>
<imageobject>
@@ -2022,21 +2080,174 @@
</imageobject>
</mediaobject>
</figure>
- <para>Now you can see two extra options in the menu: <emphasis>
- <property>Toggle visible state</property></emphasis>, <emphasis>
- <property>Toggle expand state</property></emphasis>.</para>
- <itemizedlist>
- <listitem><para> <emphasis>
- <property>Toggle visible state</property></emphasis> ( <inlinemediaobject><imageobject>
- <imagedata fileref="images/plugins/visibleState.png"/>
- </imageobject></inlinemediaobject>) is used to hide/show an item on the mapping diagram.</para></listitem>
- <listitem><para> <emphasis>
- <property>Toggle expand state</property></emphasis> ( <inlinemediaobject><imageobject>
- <imagedata fileref="images/plugins/expandState.png"/>
- </imageobject></inlinemediaobject>) is used for expanding/collapsing fields of the item.</para></listitem>
- </itemizedlist>
- <para>All the described types of the context menu are also available in the <property>Outline</property> view.</para>
+ <para>The next table describes all the extra options in the menu of mapping items:</para>
+
+ <table>
+ <title>Extra Options in the Context Menu of Mapping Item</title>
+
+ <tgroup cols="3">
+ <colspec colnum="1" align="left" colwidth="1*"/>
+ <colspec colnum="2" align="left" colwidth="1*"/>
+ <colspec colnum="3" align="left" colwidth="3*"/>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Icon</para>
+ </entry>
+
+ <entry align="center">
+ <para>Command</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para><inlinemediaobject><imageobject>
+ <imagedata fileref="images/plugins/visibleState.png"/>
+ </imageobject></inlinemediaobject>
+ </para>
+ </entry>
+ <entry>
+ <para>Toggle Visible State</para>
+ </entry>
+ <entry>
+ <para>Used to hide/show an item on the mapping diagram</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><inlinemediaobject><imageobject>
+ <imagedata fileref="images/plugins/expandState.png"/>
+ </imageobject></inlinemediaobject>
+ </para>
+ </entry>
+ <entry>
+ <para>Expand|Collapse</para>
+ </entry>
+ <entry>
+ <para>Used for expanding/collapsing fields of the item</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><inlinemediaobject><imageobject>
+ <imagedata fileref="images/plugins/openSourceFile_but.png"/>
+ </imageobject></inlinemediaobject>
+ </para>
+ </entry>
+ <entry>
+ <para>Open Source File</para>
+ </entry>
+ <entry>
+ <para>Makes it possible to open a source file for a chosen
+ object/element. The selected element will be highlighted in the open file.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><inlinemediaobject><imageobject>
+ <imagedata fileref="images/plugins/openMappingFile_but.png"/>
+ </imageobject></inlinemediaobject>
+ </para>
+ </entry>
+ <entry>
+ <para>Open Mapping File</para>
+ </entry>
+ <entry>
+ <para>Makes it possible to open a mapping file for a chosen
+ object/element. The selected element will be highlighted in the open file.</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <tip>
+ <title>Tip:</title>
+ <para>All the described types of the context menu are also available in the <property>Outline</property> view.</para>
+ </tip>
+
+ <para>The below table lists the actions that could be performed using the keyboard keys (or keys combinations).</para>
+
+ <table>
+ <title>Hibernate Mapping Diagram Shortcut Keys</title>
+
+ <tgroup cols="2">
+ <colspec colnum="1" align="left" colwidth="3*"/>
+ <colspec colnum="2" align="left" colwidth="1*"/>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Command</para>
+ </entry>
+
+ <entry align="center">
+ <para>Binding</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>Scroll the diagram content</para>
+ </entry>
+ <entry>
+ <para>Ctrl + Shift + arrows</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Collapse/Expand selected item(s)</para>
+ </entry>
+ <entry>
+ <para> Enter </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Show/Hide selected item(s)</para>
+ </entry>
+ <entry>
+ <para> + </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Sort items in alphabetical order or return the initial state</para>
+ </entry>
+ <entry>
+ <para>Space</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Navigate between the items</para>
+ </entry>
+ <entry>
+ <para>Arrows</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
<para>It's possible to save the diagram in the eclipse workspace. Click the usual <emphasis>
<property>File > Save As</property></emphasis> option, the wizard will ask you to set the location within you project
where to save the file and give the name for the diagram. The item's names concatenated with the ampersand
15 years, 1 month
JBoss Tools SVN: r18719 - trunk/hibernatetools/docs/reference/en/images/plugins.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-11-17 12:01:58 -0500 (Tue, 17 Nov 2009)
New Revision: 18719
Modified:
trunk/hibernatetools/docs/reference/en/images/plugins/autoLayout.png
trunk/hibernatetools/docs/reference/en/images/plugins/expandState.png
trunk/hibernatetools/docs/reference/en/images/plugins/plugins_18_g.png
trunk/hibernatetools/docs/reference/en/images/plugins/toggleConnections.png
trunk/hibernatetools/docs/reference/en/images/plugins/visibleState.png
Log:
https://jira.jboss.org/jira/browse/JBDS-921 - updating the images as the context menu commands were changed;
Modified: trunk/hibernatetools/docs/reference/en/images/plugins/autoLayout.png
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/docs/reference/en/images/plugins/expandState.png
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/docs/reference/en/images/plugins/plugins_18_g.png
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/docs/reference/en/images/plugins/toggleConnections.png
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/docs/reference/en/images/plugins/visibleState.png
===================================================================
(Binary files differ)
15 years, 1 month