Author: estherbin
Date: 2008-08-08 11:56:27 -0400 (Fri, 08 Aug 2008)
New Revision: 9631
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
Log:
JBIDE-2594 issue implementation add global el variables scope.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF 2008-08-08 15:49:53
UTC (rev 9630)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF 2008-08-08 15:56:27
UTC (rev 9631)
@@ -27,7 +27,8 @@
org.jboss.tools.jst.web.ui.wizards.tomcatvm,
org.jboss.tools.jst.jsp.jspeditor.jsppreview,
org.jboss.tools.common.model.ui.texteditors.preferences,
- org.jboss.tools.jst.web.ui.editors.webapp.form
+ org.jboss.tools.jst.web.ui.editors.webapp.form,
+ org.jboss.tools.vpe
Require-Bundle: org.jboss.tools.common,
org.eclipse.ui.ide,
org.eclipse.ui.views,
@@ -84,4 +85,5 @@
org.eclipse.core.runtime,
org.eclipse.debug.ui
Bundle-Version: 2.0.0
+Import-Package: org.jboss.tools.vpe.editor.css
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2008-08-08 15:49:53 UTC (rev
9630)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2008-08-08 15:56:27 UTC (rev
9631)
@@ -41,6 +41,8 @@
<extension point="org.eclipse.ui.preferencePages">
<page category="org.jboss.tools.common.model.ui"
class="org.jboss.tools.jst.web.ui.internal.preferences.LibrarySetsPreferencePage"
id="org.jboss.tools.common.xstudio.libsets" name="Library Sets">
</page>
+ <page category="org.jboss.tools.common.model.ui"
class="org.jboss.tools.jst.web.ui.internal.preferences.ELVariablesPreferencePage"
id="org.jboss.tools.common.xstudio.elvariables" name="El
Variables">
+ </page>
</extension>
<extension point="org.eclipse.ui.editors">
<editor
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java
(rev 0)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java 2008-08-08
15:56:27 UTC (rev 9631)
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jst.web.ui.internal.preferences;
+
+import java.util.Properties;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.vpe.editor.css.GlobalElVariablesComposite;
+import org.jboss.tools.vpe.editor.css.VpeResourcesDialog;
+
+/**
+ * Page for the El preferences.
+ *
+ * @author Evgenij Stherbin
+ */
+public class ELVariablesPreferencePage extends PreferencePage implements
IWorkbenchPreferencePage {
+
+ /** The el. */
+ private GlobalElVariablesComposite el = new GlobalElVariablesComposite();
+
+ /**
+ * Creates the contents.
+ *
+ * @param parent the parent
+ *
+ * @return the control
+ *
+ * @see
org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+
+ GridData data;
+ Composite c = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, false);
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ c.setLayout(layout);
+
+ setUpVariableComposite(el);
+ data = new GridData(GridData.FILL_BOTH);
+ final Control elControl = el.createControl(c);
+ elControl.setLayoutData(data);
+
+ return c;
+ }
+
+ /**
+ * Perform ok.
+ *
+ * @return true, if perform ok
+ */
+ @Override
+ public boolean performOk() {
+ boolean rst = super.performOk();
+ el.commit();
+ return rst;
+ }
+
+ /**
+ * Sets the up variable composite.
+ *
+ * @param el the el
+ */
+ private void setUpVariableComposite(GlobalElVariablesComposite el){
+ final VpeResourcesDialog dialog = new VpeResourcesDialog();
+ final Properties p = new Properties();
+
+ p.setProperty("help", "VpeResourcesDialog");
+ p.put("path", Platform.getLocation());
+ p.put("model", PreferenceModelUtilities.getPreferenceModel());
+ dialog.setObject(p);
+ el.setObject(p);
+ }
+
+ /**
+ * Init.
+ *
+ * @param workbench the workbench
+ *
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ public void init(IWorkbench workbench) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Property changes on:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native