Author: scabanovich
Date: 2007-10-25 07:42:41 -0400 (Thu, 25 Oct 2007)
New Revision: 4508
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XLabelProvider.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java
Log:
JBIDE-1182
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java 2007-10-25
11:35:32 UTC (rev 4507)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java 2007-10-25
11:42:41 UTC (rev 4508)
@@ -53,7 +53,9 @@
registerAction(actionBars, o, "CopyActions.Copy",
ActionFactory.COPY.getId());
registerAction(actionBars, o, "CopyActions.Paste",
ActionFactory.PASTE.getId());
registerAction(actionBars, o, "CopyActions.Cut",
ActionFactory.CUT.getId());
- actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, new XOpenAction(o));
+ if(o.getFileType() <= XModelObject.FILE) {
+ actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, new XOpenAction(o));
+ }
}
}
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XLabelProvider.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XLabelProvider.java
(rev 0)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XLabelProvider.java 2007-10-25
11:42:41 UTC (rev 4508)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.ui.navigator;
+
+import org.jboss.tools.common.model.impl.ExtraRootImpl;
+import org.jboss.tools.jst.web.messages.xpl.WebUIMessages;
+import org.jboss.tools.jst.web.model.pv.WebProjectNode;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class XLabelProvider extends WebProjectsLabelProvider {
+
+ public XLabelProvider() {}
+
+ public String getText(Object element) {
+ if(element instanceof WebProjectNode && element instanceof ExtraRootImpl) {
+ return WebUIMessages.WEB_RESOURCES;
+ }
+ return super.getText(element);
+ }
+
+
+}