JBoss Tools SVN: r12190 - trunk/birt/features.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2008-12-01 17:00:23 -0500 (Mon, 01 Dec 2008)
New Revision: 12190
Removed:
trunk/birt/features/org.jboss.tools.birt.integration.wtp.feature/
Log:
[JBIDE-3239] not required
16 years
JBoss Tools SVN: r12189 - trunk/birt/features/org.jboss.tools.birt.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2008-12-01 17:00:13 -0500 (Mon, 01 Dec 2008)
New Revision: 12189
Modified:
trunk/birt/features/org.jboss.tools.birt.feature/feature.xml
Log:
[JBIDE-3239] include plugin instead of feature
Modified: trunk/birt/features/org.jboss.tools.birt.feature/feature.xml
===================================================================
--- trunk/birt/features/org.jboss.tools.birt.feature/feature.xml 2008-12-01 20:30:54 UTC (rev 12188)
+++ trunk/birt/features/org.jboss.tools.birt.feature/feature.xml 2008-12-01 22:00:13 UTC (rev 12189)
@@ -28,8 +28,6 @@
<import feature="org.eclipse.birt.integration.wtp" version="2.3.1"/>
</requires>
- <includes id="org.jboss.tools.birt.integration.wtp.feature" version="0.0.0"/>
-
<plugin
id="org.jboss.tools.birt.oda"
download-size="0"
@@ -51,4 +49,10 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.birt.integration.wtp.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
</feature>
16 years
JBoss Tools SVN: r12188 - in trunk/jst/plugins: org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-12-01 15:30:54 -0500 (Mon, 01 Dec 2008)
New Revision: 12188
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java
Log:
size of CSS Class Wizard was adjusted
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2008-12-01 18:58:18 UTC (rev 12187)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2008-12-01 20:30:54 UTC (rev 12188)
@@ -10,11 +10,11 @@
******************************************************************************/
package org.jboss.tools.jst.jsp.outline.cssdialog;
+
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
-
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
@@ -47,12 +47,15 @@
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
@@ -191,16 +194,26 @@
@Override
protected Control createDialogArea(final Composite parent) {
final Composite composite = (Composite) super.createDialogArea(parent);
- return createDialogComposite(composite);
+ final Control control =createDialogComposite(composite);
+ return control;
}
+ private void setCentered(Shell dialogShell) {
+ Display display = dialogShell.getDisplay();
+ int width = display.getClientArea().width;
+ int height = display.getClientArea().height;
+ dialogShell.setLocation(((width - dialogShell.getSize().x) / 2), ((height - dialogShell.getSize().y) / 2));
+ }
/**
* @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(Composite)
- */
+// */
@Override
protected void createButtonsForButtonBar(Composite parent) {
super.createButtonsForButtonBar(parent);
updateOKButtonState();
+ getShell().setSize(550, 660);
+ setCentered(getShell());
+ getShell().layout(true);
}
private Split split;
@@ -216,7 +229,7 @@
setMessage(JstUIMessages.CSS_STYLE_CLASS_EDITOR_DESCRIPTION);
}
composite.setLayout(new GridLayout());
-
+
// ===============================================================================
// Create split component that separates dialog on 2 parts
// ===============================================================================
@@ -733,7 +746,8 @@
/**
* @see org.eclipse.jface.dialogs.Dialog#close()
*/
- public boolean close() {
+ @Override
+ public boolean close() {
int code = getReturnCode();
switch (code) {
case OK:
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java 2008-12-01 18:58:18 UTC (rev 12187)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java 2008-12-01 20:30:54 UTC (rev 12188)
@@ -46,6 +46,7 @@
public NewCSSClassWizard() {
super();
setWindowTitle(WIZARD_WINDOW_TITLE);
+
}
/**
@@ -59,7 +60,8 @@
/**
* Adding the page to the wizard.
*/
- public void addPages() {
+ @Override
+ public void addPages() {
page = new NewCSSClassWizardPage();
addPage(page);
}
@@ -68,7 +70,8 @@
* This method is called when 'Finish' button is pressed in the wizard. We
* will create an operation and run it using wizard as execution context.
*/
- public boolean performFinish() {
+ @Override
+ public boolean performFinish() {
page.saveChanges();
return true;
16 years
JBoss Tools SVN: r12187 - trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2008-12-01 13:58:18 -0500 (Mon, 01 Dec 2008)
New Revision: 12187
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF
Log:
[JBIDE-3325] do not depend on a specific version
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF 2008-12-01 18:58:04 UTC (rev 12186)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/META-INF/MANIFEST.MF 2008-12-01 18:58:18 UTC (rev 12187)
@@ -18,6 +18,6 @@
org.eclipse.jdt.launching,
org.eclipse.jst.jee;bundle-version="1.0.100",
org.eclipse.jst.server.core;bundle-version="1.1.0",
- org.jboss.tools.jmx.core.test;bundle-version="0.2.2"
+ org.jboss.tools.jmx.core.test
Eclipse-LazyStart: true
Bundle-ClassPath: jbossastest.jar
16 years
JBoss Tools SVN: r12186 - in trunk/jmx: plugins/org.jboss.tools.jmx.core/META-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2008-12-01 13:58:04 -0500 (Mon, 01 Dec 2008)
New Revision: 12186
Modified:
trunk/jmx/features/org.jboss.tools.jmx.feature/feature.xml
trunk/jmx/plugins/org.jboss.tools.jmx.core/META-INF/MANIFEST.MF
trunk/jmx/plugins/org.jboss.tools.jmx.ui/META-INF/MANIFEST.MF
trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF
trunk/jmx/tests/org.jboss.tools.jmx.ui.test.interactive/META-INF/MANIFEST.MF
trunk/jmx/tests/org.jboss.tools.jmx.ui.test/META-INF/MANIFEST.MF
Log:
[JBIDE-3098] build system generates qualifier; not required in manifest.mf & feature.xml
Modified: trunk/jmx/features/org.jboss.tools.jmx.feature/feature.xml
===================================================================
--- trunk/jmx/features/org.jboss.tools.jmx.feature/feature.xml 2008-12-01 17:58:03 UTC (rev 12185)
+++ trunk/jmx/features/org.jboss.tools.jmx.feature/feature.xml 2008-12-01 18:58:04 UTC (rev 12186)
@@ -2,7 +2,7 @@
<feature
id="org.jboss.tools.jmx.feature"
label="%featureName"
- version="0.2.2.qualifier"
+ version="0.2.2"
provider-name="%featureProvider">
<description url="http://code.google.com/p/eclipse-jmx/">
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.core/META-INF/MANIFEST.MF 2008-12-01 17:58:03 UTC (rev 12185)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.core/META-INF/MANIFEST.MF 2008-12-01 18:58:04 UTC (rev 12186)
@@ -1,7 +1,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %BundleName
Bundle-SymbolicName: org.jboss.tools.jmx.core;singleton:=true
-Bundle-Version: 0.2.1.qualifier
+Bundle-Version: 0.2.1
Bundle-Activator: org.jboss.tools.jmx.core.JMXActivator
Bundle-Vendor: %BundleProvider
Require-Bundle: org.eclipse.core.runtime
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.ui/META-INF/MANIFEST.MF 2008-12-01 17:58:03 UTC (rev 12185)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.ui/META-INF/MANIFEST.MF 2008-12-01 18:58:04 UTC (rev 12186)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %BundleName
Bundle-SymbolicName: org.jboss.tools.jmx.ui;singleton:=true
-Bundle-Version: 0.2.2.qualifier
+Bundle-Version: 0.2.2
Bundle-Activator: org.jboss.tools.jmx.ui.JMXUIActivator
Bundle-Vendor: %BundleProvider
Require-Bundle: org.eclipse.ui,
Modified: trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF 2008-12-01 17:58:03 UTC (rev 12185)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF 2008-12-01 18:58:04 UTC (rev 12186)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %BundleName
Bundle-SymbolicName: org.jboss.tools.jmx.core.test
-Bundle-Version: 0.2.2.qualifier
+Bundle-Version: 0.2.2
Bundle-Activator: org.jboss.tools.jmx.core.tests.JMXTestPlugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %BundleProvider
Modified: trunk/jmx/tests/org.jboss.tools.jmx.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.ui.test/META-INF/MANIFEST.MF 2008-12-01 17:58:03 UTC (rev 12185)
+++ trunk/jmx/tests/org.jboss.tools.jmx.ui.test/META-INF/MANIFEST.MF 2008-12-01 18:58:04 UTC (rev 12186)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: JMX UI Test Fragment
Bundle-SymbolicName: org.jboss.tools.jmx.ui.test
-Bundle-Version: 0.2.1.qualifier
+Bundle-Version: 0.2.1
Fragment-Host: org.jboss.tools.jmx.ui
Require-Bundle: org.junit
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jmx/tests/org.jboss.tools.jmx.ui.test.interactive/META-INF/MANIFEST.MF
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.ui.test.interactive/META-INF/MANIFEST.MF 2008-12-01 17:58:03 UTC (rev 12185)
+++ trunk/jmx/tests/org.jboss.tools.jmx.ui.test.interactive/META-INF/MANIFEST.MF 2008-12-01 18:58:04 UTC (rev 12186)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: JMX UI Interactive Tests Bundle
Bundle-SymbolicName: org.jboss.tools.jmx.ui.test.interactive;singleton:=true
-Bundle-Version: 0.2.2.qualifier
+Bundle-Version: 0.2.2
Bundle-Activator: org.jboss.tools.jmx.ui.test.interactive.Activator
Bundle-Vendor: Jeff Mesnil
Require-Bundle: org.eclipse.ui,
16 years
JBoss Tools SVN: r12185 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs.
by jbosstools-commits@lists.jboss.org
Author: izhukov
Date: 2008-12-01 12:58:03 -0500 (Mon, 01 Dec 2008)
New Revision: 12185
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java
Log:
fix layout problem on "Edited properties" tab of CSS Dialog
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java 2008-12-01 17:53:24 UTC (rev 12184)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java 2008-12-01 17:58:03 UTC (rev 12185)
@@ -379,6 +379,8 @@
Button btn = null;
final Text text;
+ String[] values = null;
+ boolean ext = false;
// create "button" in case of FONT_FAMILY style property
if (name.equalsIgnoreCase(CSSConstants.FONT_FAMILY)) {
Composite tmpComposite = getCompositeElement();
@@ -422,14 +424,10 @@
}
});
} else {
- text = new Text(this, SWT.BORDER);
- text.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- }
+ if (Util.searchInExtElement(name)) {
+ text = new Text(this, SWT.BORDER);
+ text.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- String[] values = null;
- boolean ext = false;
- if (btn == null) {
- if (Util.searchInExtElement(name)) {
values = Util.convertExtString(value);
ext = true;
final Combo extCombo = new Combo(this, SWT.BORDER | SWT.READ_ONLY);
@@ -478,6 +476,10 @@
}
});
} else {
+ Composite tmpComposite = getCompositeElement();
+ text = new Text(tmpComposite, SWT.BORDER);
+ text.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
+
text.addModifyListener(new ModifyListener() {
String key = name;
16 years
JBoss Tools SVN: r12184 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-12-01 12:53:24 -0500 (Mon, 01 Dec 2008)
New Revision: 12184
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/fileUpload.xhtml.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-2921, JUnit test was updated.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/fileUpload.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/fileUpload.xhtml.xml 2008-12-01 17:48:17 UTC (rev 12183)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/fileUpload.xhtml.xml 2008-12-01 17:53:24 UTC (rev 12184)
@@ -12,17 +12,17 @@
</DIV>
</DIV>
<DIV CLASS="rich-fileupload-button-border" STYLE="float: left;">
- <DIV
- CLASS="rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-start">
- <B> Upload</B>
+ <DIV CLASS="rich-fileupload-button rich-fileupload-font">
+ <DIV
+ CLASS="rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-start">
+ <B> Upload</B>
+ </DIV>
</DIV>
</DIV>
<DIV CLASS="rich-fileupload-button-border" STYLE="float: right;">
<DIV CLASS="rich-fileupload-button rich-fileupload-font">
- <A CLASS="rich-fileupload-button-selection">
- <DIV
- CLASS="rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-clear">Clear All</DIV>
- </A>
+ <DIV
+ CLASS="rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-clear"> Clear All</DIV>
</DIV>
</DIV>
</TD>
16 years
JBoss Tools SVN: r12183 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-12-01 12:48:17 -0500 (Mon, 01 Dec 2008)
New Revision: 12183
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
Log:
JBIDE-3290 sorting/filtering is not updating correctly in code completion of source page in VPE
The EL-proposals are disallowed to be shown if there is no #{-prefix is typed in the text
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2008-12-01 17:47:26 UTC (rev 12182)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2008-12-01 17:48:17 UTC (rev 12183)
@@ -369,6 +369,12 @@
boolean isInEl = checkStartPositionInEL(viewer, offset);
String prefix= engine.getPrefix(viewer, offset, start, end);
+ // JBIDE-3290 Quick-fix - this supresses the EL-proposals suggestions
+ // in case of no "#{"-prefix is typed
+
+ if (!isInEl)
+ return NO_PROPOSALS;
+
if(isInEl && (prefix == null || prefix.length() == 0)) {
String el = viewer.getDocument().get().substring(start, offset) + "a";
ELModel model = engine.getParserFactory().createParser().parse(el);
16 years
JBoss Tools SVN: r12182 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-12-01 12:47:26 -0500 (Mon, 01 Dec 2008)
New Revision: 12182
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java
Log:
JBIDE-3290 sorting/filtering is not updating correctly in code completion of source page in VPE
The EL-proposals are disallowed to be shown if there is no #{-prefix is typed in the text
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java 2008-12-01 17:21:27 UTC (rev 12181)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java 2008-12-01 17:47:26 UTC (rev 12182)
@@ -175,7 +175,11 @@
}
Collection elProposals = null;
- if (elQueryString != null) {
+ if (elQueryString != null
+ // JBIDE-3290 Quick-fix - this supresses the EL-proposals suggestions
+ // in case of no "#{"-prefix is typed
+ && elStartPosition != -1
+ ) {
// Query to request for EL-proposals
try {
String query = new StringBuffer(KbQuery.TAG_SEPARATOR).append(tagName).append(KbQuery.ATTRIBUTE_SEPARATOR).append(attributeName).append(KbQuery.ENUMERATION_SEPARATOR).append(elQueryString).toString();
16 years
JBoss Tools SVN: r12181 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-12-01 12:21:27 -0500 (Mon, 01 Dec 2008)
New Revision: 12181
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java
Log:
CODING IN PROGRESS - issue JBIDE-2921: Unworked attributes of <rich:uploadFile>.
https://jira.jboss.org/jira/browse/JBIDE-2921
- Item #3 has been fixed: added support of attributes *ClassDisabled.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java 2008-12-01 17:20:27 UTC (rev 12180)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java 2008-12-01 17:21:27 UTC (rev 12181)
@@ -1,16 +1,11 @@
-
-
package org.jboss.tools.jsf.vpe.richfaces.template;
-import java.util.HashMap;
-import java.util.Map;
-
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
-import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
import org.mozilla.interfaces.nsIDOMDocument;
@@ -79,7 +74,7 @@
final StyleClasses styleClasses = new StyleClasses(source);
prepareData(source);
VpeCreationData data = null;
- ComponentUtil.setCSSLink(pageContext, FILE_UPLOAD_FILE_UPLOAD_CSS, RICH_FACES_FILE_UPLOAD_EXT); //$NON-NLS-1$ //$NON-NLS-2$
+ ComponentUtil.setCSSLink(pageContext, FILE_UPLOAD_FILE_UPLOAD_CSS, RICH_FACES_FILE_UPLOAD_EXT);
final nsIDOMElement rootDiv = visualDocument.createElement(HTML.TAG_DIV);
@@ -233,9 +228,23 @@
}
}
+ /**
+ * Stores all style-class related variables.
+ *
+ * @author yradtsevich
+ */
class StyleClasses {
+ private static final String ATTR_STOP_BUTTON_CLASS = "stopButtonClass"; //$NON-NLS-1$
+ private static final String ATTR_FILE_ENTRY_CONTROL_CLASS = "fileEntryControlClass"; //$NON-NLS-1$
+ private static final String ATTR_FILE_ENTRY_CLASS = "fileEntryClass"; //$NON-NLS-1$
+ private static final String ATTR_CLEAN_BUTTON_CLASS = "cleanButtonClass"; //$NON-NLS-1$
+ private static final String ATTR_UPLOAD_BUTTON_CLASS = "uploadButtonClass"; //$NON-NLS-1$
+ private static final String ATTR_UPLOAD_LIST_CLASS = "uploadListClass"; //$NON-NLS-1$
+ private static final String ATTR_ADD_BUTTON_CLASS = "addButtonClass"; //$NON-NLS-1$
+ private static final String POSTFIX_ENABLED = ""; //$NON-NLS-1$
+ private static final String POSTFIX_DISABLED = "Disabled"; //$NON-NLS-1$
- private String addButtonClass = "rich-fileupload-button rich-fileupload-font"; //$NON-NLS-1$
+ private String addButtonClass = "rich-fileupload-button rich-fileupload-font"; //$NON-NLS-1$
private String uploadButtonClass = "rich-fileupload-button rich-fileupload-font"; //$NON-NLS-1$
private String cleanButtonClass = "rich-fileupload-button rich-fileupload-font"; //$NON-NLS-1$
private String addButtonClassDiv2 = " rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-add"; //$NON-NLS-1$
@@ -244,41 +253,38 @@
private String uploadListClass = "rich-fileupload-list-overflow"; //$NON-NLS-1$
public StyleClasses(final Element sourceElement) {
-
- final String addButtonClass = sourceElement.getAttribute("addButtonClass"); //$NON-NLS-1$
-
+ final boolean disabled = RichFaces.VAL_TRUE
+ .equalsIgnoreCase(sourceElement.getAttribute(RichFaces.ATTR_DISABLED));
+ final String styleAttrPostfix = disabled ? POSTFIX_DISABLED : POSTFIX_ENABLED;
+
+ final String addButtonClass = sourceElement.getAttribute(
+ ATTR_ADD_BUTTON_CLASS + styleAttrPostfix);
if (ComponentUtil.isNotBlank(addButtonClass)) {
this.addButtonClass += HTML.VALUE_CLASS_DELIMITER + addButtonClass;
this.addButtonClassDiv2 += HTML.VALUE_CLASS_DELIMITER + addButtonClass;
}
- final String uploadButtonClass = sourceElement.getAttribute("uploadButtonClass"); //$NON-NLS-1$
-
+ final String uploadButtonClass = sourceElement.getAttribute(
+ ATTR_UPLOAD_BUTTON_CLASS + styleAttrPostfix);
if (ComponentUtil.isNotBlank(uploadButtonClass)) {
- this.uploadButtonClass += HTML.VALUE_CLASS_DELIMITER + uploadButtonClass;
- this.uploadButtonClass2 += HTML.VALUE_CLASS_DELIMITER + uploadButtonClass;
+ this.uploadButtonClass += HTML.VALUE_CLASS_DELIMITER + uploadButtonClass;
+ this.uploadButtonClass2 += HTML.VALUE_CLASS_DELIMITER + uploadButtonClass;
}
- final String cleanButtonClass = sourceElement.getAttribute("cleanButtonClass"); //$NON-NLS-1$
-
+ final String cleanButtonClass = sourceElement.getAttribute(
+ ATTR_CLEAN_BUTTON_CLASS + styleAttrPostfix);
if (ComponentUtil.isNotBlank(cleanButtonClass)) {
- this.cleanButtonClass += HTML.VALUE_CLASS_DELIMITER + cleanButtonClass;
- this.cleanButtonClass2 += HTML.VALUE_CLASS_DELIMITER + cleanButtonClass;
+ this.cleanButtonClass += HTML.VALUE_CLASS_DELIMITER + cleanButtonClass;
+ this.cleanButtonClass2 += HTML.VALUE_CLASS_DELIMITER + cleanButtonClass;
}
- final String uploadListClass = sourceElement.getAttribute("uploadListClass"); //$NON-NLS-1$
-
+ final String uploadListClass = sourceElement.getAttribute(
+ ATTR_UPLOAD_LIST_CLASS + styleAttrPostfix);
if (ComponentUtil.isNotBlank(uploadListClass)) {
this.uploadListClass += HTML.VALUE_CLASS_DELIMITER + uploadListClass;
}
-
- final String uploadControlClass = ComponentUtil.getAttribute(sourceElement, "uploadControlClass"); //$NON-NLS-1$
-
- if(ComponentUtil.isNotBlank(uploadControlClass)){
- this.uploadButtonClass2+= HTML.VALUE_CLASS_DELIMITER + uploadControlClass;
- }
}
-
+
public String getAddButtonClass() {
return addButtonClass;
}
@@ -308,4 +314,3 @@
}
}
}
-
16 years