Source Code Cross Referenced for FieldRenameParticipant.java in  » Workflow-Engines » osbl-1_0 » gui » participants » 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 » Workflow Engines » osbl 1_0 » gui.participants 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * 
003:         */package gui.participants;
004:
005:        import org.eclipse.core.runtime.CoreException;
006:        import org.eclipse.core.runtime.IProgressMonitor;
007:        import org.eclipse.core.runtime.OperationCanceledException;
008:        import org.eclipse.ltk.core.refactoring.Change;
009:        import org.eclipse.ltk.core.refactoring.RefactoringStatus;
010:        import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
011:        import org.eclipse.ltk.core.refactoring.participants.RenameArguments;
012:        import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
013:        import org.openarchitectureware.workflow.issues.Issue;
014:        import org.openarchitectureware.workflow.issues.Issues;
015:
016:        import core.ModelAccessTest;
017:
018:        /**
019:         * This is a participant which takes part in the eclipse field
020:         * rename refactorings. It includes the FieldModelChange class
021:         * which adapts the changes to the process model.
022:         * 
023:         * @author sh
024:         */
025:        public class FieldRenameParticipant extends RenameParticipant {
026:            // the selected element to refacter
027:            private Object selection = null;
028:
029:            // the input of the refactoring dialog
030:            private RenameArguments arguments = null;
031:
032:            /**
033:             * Constructor
034:             */
035:            public FieldRenameParticipant() {
036:            }
037:
038:            /* 
039:             * check all conditions if the model update culd be executed.
040:             * 
041:             * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#checkConditions(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext)
042:             */
043:            @Override
044:            public RefactoringStatus checkConditions(IProgressMonitor pm,
045:                    CheckConditionsContext context)
046:                    throws OperationCanceledException {
047:
048:                // do the check here if the model update could be executed
049:                RefactoringStatus result = new RefactoringStatus();
050:
051:                // check if model could be read
052:                Issues issues = ModelAccessTest.INSTANCE.readModel();
053:                Issue[] errors = issues.getErrors();
054:                for (int i = 0; i < errors.length; i++) {
055:                    Issue issue = errors[i];
056:                    result.addFatalError(issue.getMessage());
057:                }
058:                return result;
059:            }
060:
061:            /* (non-Javadoc)
062:             * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#createChange(org.eclipse.core.runtime.IProgressMonitor)
063:             */
064:            @Override
065:            public Change createChange(IProgressMonitor pm)
066:                    throws CoreException, OperationCanceledException {
067:
068:                try {
069:                    pm.beginTask("Collecting changes", 100);
070:                    FieldModelChange change = new FieldModelChange(
071:                            this .selection, this .arguments);
072:                    pm.worked(100);
073:                    return change;
074:                } finally {
075:                    pm.done();
076:                }
077:            }
078:
079:            /* (non-Javadoc)
080:             * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#getName()
081:             */
082:            @Override
083:            public String getName() {
084:                return new String("Field Rename Participant");
085:            }
086:
087:            /* This initializes the Rename Participant with the selection element.
088:             * and the input of the Refactoring Dialog.
089:             * 
090:             * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
091:             */
092:            @Override
093:            protected boolean initialize(Object element) {
094:                // the arguments of the Refactoring Dialog
095:                this .arguments = getArguments();
096:
097:                // the selection object
098:                this .selection = element;
099:
100:                // this participant could enabled by returning true
101:                return true;
102:            }
103:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.