Author: scabanovich
Date: 2010-09-07 11:12:57 -0400 (Tue, 07 Sep 2010)
New Revision: 24769
Added:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/impl/SystemEventListenerObjectImpl.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf2.meta
Log:
https://jira.jboss.org/browse/JBIDE-7015
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2010-09-07 15:10:53 UTC (rev 24768)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2010-09-07 15:12:57 UTC (rev 24769)
@@ -172,6 +172,8 @@
class="org.jboss.tools.jsf.model.ReferenceObjectImpl"/>
<xclass id="org.jboss.tools.jsf.model.impl.OrderingObjectImpl"
class="org.jboss.tools.jsf.model.impl.OrderingObjectImpl"/>
+ <xclass id="org.jboss.tools.jsf.model.impl.SystemEventListenerObjectImpl"
+ class="org.jboss.tools.jsf.model.impl.SystemEventListenerObjectImpl"/>
<xclass id="org.jboss.tools.jsf.model.handlers.AddCaseToGroupHandler"
class="org.jboss.tools.jsf.model.handlers.AddCaseToGroupHandler"/>
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf2.meta
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf2.meta 2010-09-07 15:10:53 UTC
(rev 24768)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf2.meta 2010-09-07 15:12:57 UTC
(rev 24769)
@@ -1706,7 +1706,7 @@
</XActionItem>
<XDependencies/>
</XModelEntity>
- <XModelEntity ImplementingClass="%Custom%"
+ <XModelEntity
ImplementingClass="org.jboss.tools.jsf.model.impl.SystemEventListenerObjectImpl"
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.jsf.ui.editor.form.JSFFormLayoutData"
XMLSUBPATH="system-event-listener"
name="JSFSystemEventListener">
<XChildrenEntities/>
Added:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/impl/SystemEventListenerObjectImpl.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/impl/SystemEventListenerObjectImpl.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/impl/SystemEventListenerObjectImpl.java 2010-09-07
15:12:57 UTC (rev 24769)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.jsf.model.impl;
+
+import org.jboss.tools.common.model.impl.*;
+
+public class SystemEventListenerObjectImpl extends CustomizedObjectImpl {
+ private static final long serialVersionUID = 532550263999885851L;
+
+ public String getPresentationString() {
+ String listener = getAttributeValue("system-event-listener-class");
+ if(listener != null && listener.length() > 0) {
+ listener = listener.substring(listener.lastIndexOf('.') + 1);
+ }
+ String event = getAttributeValue("system-event-class");
+ if(event != null && event.length() > 0) {
+ event = event.substring(event.lastIndexOf('.') + 1);
+ }
+ return "" + event + " -> " + listener;
+ }
+
+ public String getPathPart() {
+ String listener = getAttributeValue("system-event-listener-class");
+ String event = getAttributeValue("system-event-class");
+ return applyDuplicate("" + event + ":" + listener);
+ }
+
+}
Property changes on:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/impl/SystemEventListenerObjectImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain