Source Code Cross Referenced for Action.java in  » IDE-Eclipse » ui » org » eclipse » ui » internal » cheatsheets » data » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui » org.eclipse.ui.internal.cheatsheets.data 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2002, 2007 IBM Corporation and others.
003:         * All rights reserved. This program and the accompanying materials
004:         * are made available under the terms of the Eclipse Public License v1.0
005:         * which accompanies this distribution, and is available at
006:         * http://www.eclipse.org/legal/epl-v10.html
007:         *
008:         * Contributors:
009:         *     IBM Corporation - initial API and implementation
010:         *******************************************************************************/package org.eclipse.ui.internal.cheatsheets.data;
011:
012:        import org.eclipse.core.runtime.IStatus;
013:        import org.eclipse.osgi.util.NLS;
014:        import org.eclipse.ui.internal.cheatsheets.ActionRunner;
015:        import org.eclipse.ui.internal.cheatsheets.Messages;
016:        import org.eclipse.ui.internal.cheatsheets.views.CheatSheetManager;
017:        import org.w3c.dom.Node;
018:
019:        /**
020:         * Class that represents an <ACTION> element in a cheatsheet. This class stores all
021:         * of the attributes associated with an Action and is capable of executing that Action.
022:         */
023:        public class Action extends AbstractExecutable {
024:            private String actionClass;
025:            private String pluginID;
026:            private boolean hasClassAttr = false;
027:            private boolean hasPluginId = false;
028:
029:            public Action() {
030:                super ();
031:            }
032:
033:            /**
034:             * This method returns the class specified to be run when the "click to perform" button is pressed for this item.
035:             * @return the class name to be run for the item
036:             */
037:            public String getActionClass() {
038:                return actionClass;
039:            }
040:
041:            /**
042:             * This method returns the string id of the plugin that contains the action class to be run.
043:             * @return the id of the plugin that has the action class
044:             */
045:            public String getPluginID() {
046:                return pluginID;
047:            }
048:
049:            /**
050:             *  This method allows you to specify the class to be run when the perform button is pressed for this 
051:             * item in the cheat sheet. 
052:             * @param classname the class to be run by the item in the cheat sheet
053:             */
054:            public void setClass(String aclass) {
055:                this .actionClass = aclass;
056:            }
057:
058:            /**
059:             * This method allows to set the plugin id of the action to be run by this item in the cheat sheet.
060:             * @param pluginId the id of the plugin containing the action class specified for this item
061:             */
062:            public void setPluginID(String pluginId) {
063:                this .pluginID = pluginId;
064:            }
065:
066:            public boolean handleAttribute(Node attribute) {
067:                if (attribute.getNodeName().equals(IParserTags.PLUGINID)) {
068:                    hasPluginId = true;
069:                    setPluginID(attribute.getNodeValue());
070:                    return true;
071:                } else if (attribute.getNodeName().equals(IParserTags.CLASS)) {
072:                    hasClassAttr = true;
073:                    setClass(attribute.getNodeValue());
074:                    return true;
075:                }
076:                return false;
077:            }
078:
079:            public String checkAttributes(Node node) {
080:                if (!hasClassAttr) {
081:                    return NLS.bind(Messages.ERROR_PARSING_NO_CLASS,
082:                            (new Object[] { node.getNodeName() }));
083:                }
084:                if (!hasPluginId) {
085:                    return NLS.bind(Messages.ERROR_PARSING_NO_PLUGINID,
086:                            (new Object[] { node.getNodeName() }));
087:                }
088:                if (isConfirm() && !isRequired()) {
089:                    return NLS.bind(Messages.ERROR_PARSING_REQUIRED_CONFIRM,
090:                            (new Object[] { node.getNodeName() }));
091:                }
092:                return null;
093:            }
094:
095:            public boolean isCheatSheetManagerUsed() {
096:                return true;
097:            }
098:
099:            public IStatus execute(CheatSheetManager csm) {
100:                return new ActionRunner().runAction(this , csm);
101:            }
102:
103:            public boolean hasParams() {
104:                return true;
105:            }
106:
107:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.