├── .gitignore
├── README.md
├── jp.af.amateras.htmleditor.feature
├── .project
├── build.properties
└── feature.xml
└── jp.sf.amateras.htmleditor
├── .classpath
├── .project
├── .settings
└── org.eclipse.jdt.core.prefs
├── META-INF
└── MANIFEST.MF
├── OSGI-INF
└── l10n
│ ├── bundle.properties
│ └── bundle_ja.properties
├── build-JavaScriptExecuter.xml
├── build.properties
├── docs
├── book.css
├── editors
│ ├── index.html
│ ├── js_format_1.png
│ ├── js_format_2.png
│ └── run_js.png
├── index.html
├── install
│ └── index.html
├── preferences
│ ├── code_assist.png
│ ├── css_editor.png
│ ├── dtd.png
│ ├── index.html
│ ├── preference.png
│ ├── project_config.png
│ ├── project_js_1.png
│ └── project_js_2.png
├── views
│ ├── css_preview.png
│ ├── index.html
│ └── palette.png
└── wizards
│ ├── add_js_libs.png
│ ├── html_wizard_1.png
│ ├── html_wizard_2.png
│ ├── html_wizard_3.png
│ ├── index.html
│ ├── jsp_wizard_1.png
│ ├── xml_wizard_1.png
│ └── xml_wizard_2.png
├── icons
├── annotation.gif
├── attlist.gif
├── attribute.gif
├── backward.gif
├── body.gif
├── button.gif
├── checkbox.gif
├── class.gif
├── column.gif
├── comment.gif
├── css.png
├── css_prop.gif
├── css_rule.gif
├── doctype.gif
├── dtd.gif
├── element.gif
├── entity.gif
├── error.gif
├── file.gif
├── folder.gif
├── form.gif
├── forward.gif
├── function.gif
├── hidden.gif
├── html.gif
├── html.png
├── image.gif
├── interface.gif
├── jar.gif
├── jar_ext.gif
├── javascript.gif
├── jsp.png
├── label.gif
├── link.gif
├── list.gif
├── notation.gif
├── output.gif
├── package.gif
├── package_empty.gif
├── palette.gif
├── panel.gif
├── password.gif
├── properties.gif
├── radio.gif
├── refresh.gif
├── run.gif
├── select.gif
├── sort.gif
├── table.gif
├── tag.gif
├── template.gif
├── text.gif
├── textarea.gif
├── title.gif
├── value.gif
├── var.gif
├── web.gif
├── xml.png
└── xsd.gif
├── js
├── chrome
│ └── chrome-16.js
├── ecma
│ └── ecmascript-5.js
├── firefox
│ └── firefox-9.js
├── jquery
│ └── 1.7.1
│ │ └── jquery-1.7.1.js
├── nodejs
│ └── 0.6.6
│ │ └── node.js
├── prototype
│ ├── 1.6.0
│ │ └── prototype-1.6.0.2.js
│ └── 1.7.0.0
│ │ └── prototype.js
└── scriptaculous
│ ├── 1.8.1
│ ├── builder.js
│ ├── controls.js
│ ├── dragdrop.js
│ ├── effects.js
│ ├── scriptaculous.js
│ ├── slider.js
│ ├── sound.js
│ └── unittest.js
│ └── 1.9.0
│ ├── builder.js
│ ├── controls.js
│ ├── dragdrop.js
│ ├── effects.js
│ ├── scriptaculous.js
│ ├── slider.js
│ ├── sound.js
│ └── unittest.js
├── lib
├── JavaScriptExecutor.jar
├── commons-jxpath-1.2.jar
├── compiler.jar
├── dtdparser121.jar
├── egen-develop.jar
├── fuzzyxml.jar
├── js.jar
├── jsp-api.jar
├── jtidy-8.0-20111220.jar
├── org.apache.commons.jrcs.diff.jar
├── servlet-api.jar
├── ss_css2.jar
├── trang.jar
├── xercesImpl.jar
└── xml-apis.jar
├── license
├── ApacheLicense2.0.txt
├── LGPL.html
└── trang_copying.txt
├── plugin.xml
├── schema
├── customTagAttributeAssist.exsd
├── customTagConverter.exsd
├── customTagValidator.exsd
├── fileAssistProcessor.exsd
├── hyperlinkProvider.exsd
├── javaScriptCompleter.exsd
├── jspelAssistProcessor.exsd
├── noValidationNatures.exsd
├── pagefilter.exsd
├── paletteItem.exsd
├── preferenceContributer.exsd
└── tldLocator.exsd
├── src
├── DTD
│ ├── XMLSchema.dtd
│ ├── datatypes.dtd
│ ├── jspxml.dtd
│ ├── web-app_2_2.dtd
│ ├── web-app_2_3.dtd
│ ├── web-jsptaglibrary_1_1.dtd
│ └── web-jsptaglibrary_1_2.dtd
├── TLD
│ ├── c-1_0-rt.tld
│ ├── c-1_0.tld
│ ├── c.tld
│ ├── fmt-1_0-rt.tld
│ ├── fmt-1_0.tld
│ ├── fmt.tld
│ ├── fn.tld
│ ├── permittedTaglibs.tld
│ ├── scriptfree.tld
│ ├── sql-1_0-rt.tld
│ ├── sql-1_0.tld
│ ├── sql.tld
│ ├── x-1_0-rt.tld
│ ├── x-1_0.tld
│ └── x.tld
├── XSD
│ ├── j2ee_1_4.xsd
│ ├── j2ee_web_services_1_1.xsd
│ ├── j2ee_web_services_client_1_1.xsd
│ ├── jsp_2_0.xsd
│ ├── jspxml.xsd
│ ├── web-app_2_4.xsd
│ ├── web-jsptaglibrary_2_0.xsd
│ └── xml.xsd
└── jp
│ └── sf
│ └── amateras
│ ├── csseditor
│ └── editors
│ │ ├── CSSAssistProcessor.java
│ │ ├── CSSBlockScanner.java
│ │ ├── CSSCharacterPairMatcher.java
│ │ ├── CSSConfiguration.java
│ │ ├── CSSDefinition.java
│ │ ├── CSSEditor.java
│ │ ├── CSSFileDocumentProvider.java
│ │ ├── CSSInfo.java
│ │ ├── CSSOutlinePage.java
│ │ ├── CSSPartitionScanner.java
│ │ ├── CSSRule.java
│ │ ├── CSSTextDocumentProvider.java
│ │ └── ChooseColorAction.java
│ ├── dtdeditor
│ └── editors
│ │ ├── DTDAssistProcessor.java
│ │ ├── DTDConfiguration.java
│ │ ├── DTDEditor.java
│ │ ├── DTDFileDocumentProvider.java
│ │ ├── DTDOutlinePage.java
│ │ ├── DTDPartitionScanner.java
│ │ ├── DTDTagScanner.java
│ │ └── DTDTextDocumentProvider.java
│ ├── htmleditor
│ ├── AbstractServerPropertyPage.java
│ ├── AbstractValidationDialog.java
│ ├── AssistPreferencePage.java
│ ├── CSSEditorPreferencePage.java
│ ├── ColorProvider.java
│ ├── CustomAssistPreferencePage.java
│ ├── DTDPreferencePage.java
│ ├── FormatterPreferencePage.java
│ ├── HTMLEditorPreferencePage.java
│ ├── HTMLHyperlinkDetector.java
│ ├── HTMLPlugin.java
│ ├── HTMLPluginResources.properties
│ ├── HTMLPluginResources_ja.properties
│ ├── HTMLPreferenceInitializer.java
│ ├── HTMLProjectBuilder.java
│ ├── HTMLProjectNature.java
│ ├── HTMLProjectParams.java
│ ├── HTMLProjectPropertyPage.java
│ ├── HTMLUtil.java
│ ├── ICustomTagAttributeAssist.java
│ ├── ICustomTagConverter.java
│ ├── ICustomTagConverterContributer.java
│ ├── ICustomTagValidator.java
│ ├── ICustomTagValidatorContributer.java
│ ├── IFileAssistProcessor.java
│ ├── IHTMLPreferenceContributer.java
│ ├── IHyperlinkProvider.java
│ ├── IOUtil.java
│ ├── JSPEditorPreferencePage.java
│ ├── JavaScriptEditorPreferencePage.java
│ ├── JavaScriptPropertyPage.java
│ ├── JavaUtil.java
│ ├── SearchXPathDialog.java
│ ├── ServerConfig.java
│ ├── StringUtils.java
│ ├── TLDPreferencePage.java
│ ├── TableViewerSupport.java
│ ├── WebAppClasspathVariableInitializer.java
│ ├── XMLPreferencePage.java
│ ├── assist
│ │ ├── AssistInfo.java
│ │ ├── AttributeInfo.java
│ │ ├── AttributeValueDefinition.java
│ │ ├── CSSAssistProcessor.java
│ │ ├── CustomAttribute.java
│ │ ├── CustomElement.java
│ │ ├── FieldAssistUtils.java
│ │ ├── FileAssistProcessor.java
│ │ ├── HTMLAssistProcessor.java
│ │ ├── InnerCSSAssistProcessor.java
│ │ ├── InnerJavaScriptAssistProcessor.java
│ │ ├── PackageNameContentProposalProvider.java
│ │ ├── TagDefinition.java
│ │ ├── TagInfo.java
│ │ ├── TextInfo.java
│ │ └── TypeNameContentProposalProvider.java
│ ├── editors
│ │ ├── AbstractCharacterPairMatcher.java
│ │ ├── DocTypeRule.java
│ │ ├── FoldingInfo.java
│ │ ├── HTMLAutoEditStrategy.java
│ │ ├── HTMLCharacterPairMatcher.java
│ │ ├── HTMLConfiguration.java
│ │ ├── HTMLDoubleClickStrategy.java
│ │ ├── HTMLEditor.java
│ │ ├── HTMLEditorContributor.java
│ │ ├── HTMLEditorPart.java
│ │ ├── HTMLFileDocumentProvider.java
│ │ ├── HTMLHyperlinkInfo.java
│ │ ├── HTMLOutlinePage.java
│ │ ├── HTMLPartitionScanner.java
│ │ ├── HTMLScanner.java
│ │ ├── HTMLSourceEditor.java
│ │ ├── HTMLSourceEditorContributer.java
│ │ ├── HTMLTagScanner.java
│ │ ├── HTMLTextDocumentProvider.java
│ │ ├── HTMLValidator.java
│ │ ├── HTMLWhitespaceDetector.java
│ │ ├── IHTMLColorConstants.java
│ │ ├── IHTMLOutlinePage.java
│ │ ├── InnerCSSScanner.java
│ │ ├── InnerJavaScriptScanner.java
│ │ ├── JavaWhitespaceDetector.java
│ │ ├── JavaWordDetector.java
│ │ ├── MultiPageEditorOutlinePage.java
│ │ ├── MultiPageHTMLEditor.java
│ │ ├── NonRuleBasedDamagerRepairer.java
│ │ ├── SoftTabVerifyListener.java
│ │ ├── SplitPageHTMLEditor.java
│ │ └── TagRule.java
│ ├── gefutils
│ │ ├── AbstractDialogPropertyDescriptor.java
│ │ ├── BooleanPropertyDescriptor.java
│ │ ├── ClassSelectPropertyDescriptor.java
│ │ ├── IJarVisitor.java
│ │ ├── JarAcceptor.java
│ │ ├── LabelArrowConnection.java
│ │ ├── SpinnerFieldEditor.java
│ │ └── TextAreaPropertyDescriptor.java
│ ├── tasktag
│ │ ├── AbstractTaskTagDetector.java
│ │ ├── HTMLTaskTagDetector.java
│ │ ├── HTMLTaskTagPreferencePage.java
│ │ ├── ITaskTagDetector.java
│ │ ├── JavaScriptTaskTagDetector.java
│ │ └── TaskTag.java
│ ├── template
│ │ ├── HTMLContextType.java
│ │ ├── HTMLTemplateAssistProcessor.java
│ │ ├── HTMLTemplateManager.java
│ │ ├── HTMLTemplatePreferencePage.java
│ │ └── JavaScriptContextType.java
│ ├── views
│ │ ├── CSSPreviewView.java
│ │ ├── DefaultPaletteItem.java
│ │ ├── IPaletteContributer.java
│ │ ├── IPaletteItem.java
│ │ ├── IPaletteTarget.java
│ │ ├── ImageView.java
│ │ └── PaletteView.java
│ └── wizards
│ │ ├── HTMLNewWizard.java
│ │ ├── HTMLNewWizardPage.java
│ │ ├── JSPNewWizard.java
│ │ ├── JSPNewWizardPage.java
│ │ ├── XMLDTDWizardPage.java
│ │ ├── XMLNewWizard.java
│ │ └── XMLNewWizardPage.java
│ ├── jseditor
│ ├── editors
│ │ ├── JavaScriptAssistProcessor.java
│ │ ├── JavaScriptAutoEditStrategy.java
│ │ ├── JavaScriptCharacterPairMatcher.java
│ │ ├── JavaScriptConfiguration.java
│ │ ├── JavaScriptDoubleClickStrategy.java
│ │ ├── JavaScriptEditor.java
│ │ ├── JavaScriptEditorContributor.java
│ │ ├── JavaScriptFileDocumentProvider.java
│ │ ├── JavaScriptFunctionProposal.java
│ │ ├── JavaScriptHyperlinkDetector.java
│ │ ├── JavaScriptInformationControl.java
│ │ ├── JavaScriptJsDocAssistProcessor.java
│ │ ├── JavaScriptOutlinePage.java
│ │ ├── JavaScriptPartitionScanner.java
│ │ ├── JavaScriptScanner.java
│ │ ├── JavaScriptTextDocumentProvider.java
│ │ ├── JavaScriptUtil.java
│ │ ├── JavaScriptValidator.java
│ │ ├── JsDocParser.java
│ │ ├── additional
│ │ │ ├── AIRAliases.js
│ │ │ ├── AIRCompleter.java
│ │ │ ├── AbstractCompleter.java
│ │ │ ├── AdditionalJavaScriptCompleterManager.java
│ │ │ ├── ChromeCompleter.java
│ │ │ ├── ECMAScriptCompleter.java
│ │ │ ├── FireFoxCompleter.java
│ │ │ ├── IAdditionalJavaScriptCompleter.java
│ │ │ ├── JQueryCompleter.java
│ │ │ ├── NodeJsCompleter.java
│ │ │ ├── PrototypeCompleter.java
│ │ │ └── ScriptaculousCompleter.java
│ │ ├── beautify.js
│ │ └── model
│ │ │ ├── JavaScriptAlias.java
│ │ │ ├── JavaScriptComment.java
│ │ │ ├── JavaScriptContext.java
│ │ │ ├── JavaScriptElement.java
│ │ │ ├── JavaScriptFunction.java
│ │ │ ├── JavaScriptModel.java
│ │ │ ├── JavaScriptModelUtil.java
│ │ │ ├── JavaScriptPrototype.java
│ │ │ ├── JavaScriptVariable.java
│ │ │ └── ModelManager.java
│ ├── launch
│ │ ├── ClosureCompilerLaunchUtil.java
│ │ ├── JavaScriptLaunchConfigurationDelegate.java
│ │ ├── JavaScriptLaunchConstants.java
│ │ ├── JavaScriptLaunchShortcut.java
│ │ ├── JavaScriptLaunchUtil.java
│ │ ├── JavaScriptLibPathTable.java
│ │ ├── JavaScriptLibraryTable.java
│ │ ├── JavaScriptMainTab.java
│ │ ├── JavaScriptTabGroup.java
│ │ └── executer
│ │ │ └── JavaScriptExecutor.java
│ ├── rhino
│ │ ├── classfile
│ │ │ ├── ByteCode.java
│ │ │ └── ClassFileWriter.java
│ │ └── javascript
│ │ │ ├── Arguments.java
│ │ │ ├── BaseFunction.java
│ │ │ ├── Callable.java
│ │ │ ├── ClassCache.java
│ │ │ ├── ClassShutter.java
│ │ │ ├── CompilerEnvirons.java
│ │ │ ├── ConstProperties.java
│ │ │ ├── Context.java
│ │ │ ├── ContextAction.java
│ │ │ ├── ContextFactory.java
│ │ │ ├── ContextListener.java
│ │ │ ├── ContinuationPending.java
│ │ │ ├── DToA.java
│ │ │ ├── Decompiler.java
│ │ │ ├── DefaultErrorReporter.java
│ │ │ ├── DefiningClassLoader.java
│ │ │ ├── Delegator.java
│ │ │ ├── EcmaError.java
│ │ │ ├── ErrorReporter.java
│ │ │ ├── Evaluator.java
│ │ │ ├── EvaluatorException.java
│ │ │ ├── Function.java
│ │ │ ├── FunctionNode.java
│ │ │ ├── FunctionObject.java
│ │ │ ├── GeneratedClassLoader.java
│ │ │ ├── IRFactory.java
│ │ │ ├── IdFunctionCall.java
│ │ │ ├── IdFunctionObject.java
│ │ │ ├── IdScriptableObject.java
│ │ │ ├── ImporterTopLevel.java
│ │ │ ├── InterfaceAdapter.java
│ │ │ ├── InterpretedFunction.java
│ │ │ ├── Interpreter.java
│ │ │ ├── InterpreterData.java
│ │ │ ├── JavaAdapter.java
│ │ │ ├── JavaMembers.java
│ │ │ ├── JavaScriptException.java
│ │ │ ├── Kit.java
│ │ │ ├── LazilyLoadedCtor.java
│ │ │ ├── MemberBox.java
│ │ │ ├── NativeArray.java
│ │ │ ├── NativeBoolean.java
│ │ │ ├── NativeCall.java
│ │ │ ├── NativeContinuation.java
│ │ │ ├── NativeDate.java
│ │ │ ├── NativeError.java
│ │ │ ├── NativeFunction.java
│ │ │ ├── NativeGenerator.java
│ │ │ ├── NativeGlobal.java
│ │ │ ├── NativeIterator.java
│ │ │ ├── NativeJavaArray.java
│ │ │ ├── NativeJavaClass.java
│ │ │ ├── NativeJavaConstructor.java
│ │ │ ├── NativeJavaMethod.java
│ │ │ ├── NativeJavaObject.java
│ │ │ ├── NativeJavaPackage.java
│ │ │ ├── NativeJavaTopPackage.java
│ │ │ ├── NativeMath.java
│ │ │ ├── NativeNumber.java
│ │ │ ├── NativeObject.java
│ │ │ ├── NativeScript.java
│ │ │ ├── NativeString.java
│ │ │ ├── NativeWith.java
│ │ │ ├── Node.java
│ │ │ ├── NodeTransformer.java
│ │ │ ├── ObjArray.java
│ │ │ ├── ObjToIntMap.java
│ │ │ ├── Parser.java
│ │ │ ├── PolicySecurityController.java
│ │ │ ├── Ref.java
│ │ │ ├── RefCallable.java
│ │ │ ├── RegExpProxy.java
│ │ │ ├── RhinoException.java
│ │ │ ├── Script.java
│ │ │ ├── ScriptOrFnNode.java
│ │ │ ├── ScriptRuntime.java
│ │ │ ├── Scriptable.java
│ │ │ ├── ScriptableObject.java
│ │ │ ├── SecureCaller.java
│ │ │ ├── SecurityController.java
│ │ │ ├── SecurityUtilities.java
│ │ │ ├── SpecialRef.java
│ │ │ ├── Synchronizer.java
│ │ │ ├── Token.java
│ │ │ ├── TokenStream.java
│ │ │ ├── UintMap.java
│ │ │ ├── Undefined.java
│ │ │ ├── UniqueTag.java
│ │ │ ├── VMBridge.java
│ │ │ ├── WrapFactory.java
│ │ │ ├── WrappedException.java
│ │ │ ├── Wrapper.java
│ │ │ ├── debug
│ │ │ ├── DebugFrame.java
│ │ │ ├── DebuggableObject.java
│ │ │ ├── DebuggableScript.java
│ │ │ └── Debugger.java
│ │ │ ├── jdk13
│ │ │ └── VMBridge_jdk13.java
│ │ │ ├── jdk15
│ │ │ └── VMBridge_jdk15.java
│ │ │ ├── optimizer
│ │ │ ├── Block.java
│ │ │ ├── ClassCompiler.java
│ │ │ ├── Codegen.java
│ │ │ ├── DataFlowBitSet.java
│ │ │ ├── OptFunctionNode.java
│ │ │ ├── OptRuntime.java
│ │ │ ├── OptTransformer.java
│ │ │ └── Optimizer.java
│ │ │ ├── regexp
│ │ │ ├── NativeRegExp.java
│ │ │ ├── NativeRegExpCtor.java
│ │ │ ├── RegExpImpl.java
│ │ │ └── SubString.java
│ │ │ ├── resources
│ │ │ ├── Messages.properties
│ │ │ └── Messages_fr.properties
│ │ │ ├── serialize
│ │ │ ├── ScriptableInputStream.java
│ │ │ └── ScriptableOutputStream.java
│ │ │ └── xml
│ │ │ ├── XMLLib.java
│ │ │ └── XMLObject.java
│ └── wizards
│ │ ├── AddJavaScriptLibraryWizard.java
│ │ ├── AddJavaScriptLibraryWizardPage.java
│ │ └── JavaScriptLibrariesManager.java
│ ├── jspeditor
│ ├── compiler
│ │ ├── CompileResult.java
│ │ └── JSPCompiler.java
│ ├── converters
│ │ ├── AbstractCustomTagConverter.java
│ │ ├── HTMLConverter.java
│ │ └── NullConverter.java
│ └── editors
│ │ ├── Function.java
│ │ ├── IJSPELAssistProcessor.java
│ │ ├── IJSPFilter.java
│ │ ├── IJSPValidationMarkerCreator.java
│ │ ├── ITLDLocator.java
│ │ ├── JSPAssistProcessor.java
│ │ ├── JSPAutoEditStrategy.java
│ │ ├── JSPConfiguration.java
│ │ ├── JSPDirectiveAssistProcessor.java
│ │ ├── JSPDirectiveScanner.java
│ │ ├── JSPEditor.java
│ │ ├── JSPEditorContributor.java
│ │ ├── JSPHyperlinkProvider.java
│ │ ├── JSPInfo.java
│ │ ├── JSPOutlinePage.java
│ │ ├── JSPPreviewConverter.java
│ │ ├── JSPScriptletAssistProcessor.java
│ │ ├── JSPScriptletScanner.java
│ │ ├── JSPSourceEditor.java
│ │ ├── JSPTagInfo.java
│ │ ├── JSPValidator.java
│ │ ├── JSTLAttributeAssist.java
│ │ ├── TLDInfo.java
│ │ ├── TLDLoader.java
│ │ ├── TLDParser.java
│ │ ├── TLDResolver.java
│ │ └── TagFileParser.java
│ └── xmleditor
│ └── editors
│ ├── ClassNameAssistProcessor.java
│ ├── ClassNameHyperLinkProvider.java
│ ├── CompilationProblemRequestor.java
│ ├── DTDResolver.java
│ ├── ElementSchemaMapping.java
│ ├── IDTDResolver.java
│ ├── SchemaGenerator.java
│ ├── XMLAssistProcessor.java
│ ├── XMLConfiguration.java
│ ├── XMLEditor.java
│ ├── XMLEditorContributor.java
│ ├── XMLOutlinePage.java
│ └── XMLValidationHandler.java
└── toc.xml
/.gitignore:
--------------------------------------------------------------------------------
1 | */bin/**
2 |
--------------------------------------------------------------------------------
/jp.af.amateras.htmleditor.feature/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | jp.af.amateras.htmleditor.feature
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.pde.FeatureBuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.pde.FeatureNature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/jp.af.amateras.htmleditor.feature/build.properties:
--------------------------------------------------------------------------------
1 | bin.includes = feature.xml
2 |
--------------------------------------------------------------------------------
/jp.af.amateras.htmleditor.feature/feature.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 | [Enter Feature Description here.]
10 |
11 |
12 |
13 | [Enter Copyright Description here.]
14 |
15 |
16 |
17 | [Enter License Description here.]
18 |
19 |
20 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | jp.sf.amateras.htmleditor
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.pde.ManifestBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.pde.SchemaBuilder
20 |
21 |
22 |
23 |
24 |
25 | org.eclipse.pde.PluginNature
26 | org.eclipse.jdt.core.javanature
27 |
28 |
29 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/OSGI-INF/l10n/bundle.properties:
--------------------------------------------------------------------------------
1 | plugin.provider=Naoki Takezoe
2 | plugin.name=HTML/JSP/XML Editor Plugin
3 | plugin.preference.category=Amateras
4 | plugin.preference.appearance=Appearance
5 | plugin.preference.dtd=DTD / XML Schema
6 | plugin.preference.tld=TLD
7 | plugin.preference.codeassist=Code Assist
8 | plugin.preference.csseditor=CSS Editor
9 | plugin.preference.jspeditor=JSP Editor
10 | plugin.preference.jseditor=JavaScript Editor
11 | plugin.preference.customassist=Custom Assist
12 | plugin.preference.template=Templates
13 | plugin.preference.tasktag=Task Tags
14 | plugin.preference.formatter=Formatter
15 | plugin.editor.htmleditor=Amateras HTML Editor
16 | plugin.editor.jspeditor=Amateras JSP Editor
17 | plugin.editor.xmleditor=Amateras XML Editor
18 | plugin.editor.dtdeditor=Amateras DTD Editor
19 | plugin.editor.webbrowser=Amateras Web Browser
20 | plugin.editor.csseditor=Amateras CSS Editor
21 | plugin.editor.jseditor=Amateras JavaScript Editor
22 | plugin.wizard.category=HTML
23 | plugin.wizard.html=HTML File
24 | plugin.wizard.jsp=JSP File
25 | plugin.wizard.xml=XML File
26 | plugin.wizard.url=URL Shortcut
27 | plugin.wizard.jslibrary=Add JavaScript Library
28 | plugin.views.image=Image
29 | plugin.views.palette=Palette
30 | plugin.views.csspreview=CSS Preview
31 | plugin.launcher.javascript=JavaScript
32 | #plugin.command.formatXML=Format XML
33 | #plugin.command.formatJSP=Format JSP
34 | plugin.template.js.function=Function
35 | plugin.template.js.anonymousFunction=Anonymous Function
36 | plugin.template.js.var=Variable Definition
37 | plugin.template.js.for=for Loop
38 | plugin.template.js.while=while Loop
39 | plugin.template.js.if=if Statement
40 | plugin.template.js.try=try - catch Block
41 | plugin.template.js.new=Create new object
42 | plugin.template.js.newwithvar=Create new object with variable
43 | plugin.template.js.catch=catch Block
44 | plugin.template.js.do=do while Statement
45 | plugin.template.js.else=else Block
46 | plugin.template.js.elseif=else if Block
47 | plugin.template.js.for=for Loop with temporary variable
48 | plugin.template.js.forin=for..in Loop
49 | plugin.template.js.if=if - else Statement
50 | plugin.template.js.lazy=Lazy creation
51 | plugin.template.js.switch=switch - case Statement
52 | plugin.template.js.require=require Statement
53 | plugin.template.js.requirewithvar=require Statement with variable
54 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/build-JavaScriptExecuter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/build.properties:
--------------------------------------------------------------------------------
1 | source.. = src/
2 | output.. = bin/
3 | bin.includes = META-INF/,\
4 | .,\
5 | lib/,\
6 | icons/,\
7 | docs/,\
8 | OSGI-INF/l10n/bundle.properties,\
9 | plugin.xml,\
10 | OSGI-INF/l10n/bundle_ja.properties,\
11 | schema/,\
12 | toc.xml
13 | src.includes = src/
14 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/book.css:
--------------------------------------------------------------------------------
1 | @import "../../PRODUCT_PLUGIN/book.css";
2 | p.note {
3 | margin-left: 20px;
4 | margin-right: 20px;
5 | background-color: #FFFF88;
6 | padding: 4px;
7 | }
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/editors/js_format_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/editors/js_format_1.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/editors/js_format_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/editors/js_format_2.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/editors/run_js.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/editors/run_js.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | EclipseHTMLEditor User Guide
5 |
6 |
7 | EclipseHTMLEditor
8 |
9 | EclipseHTMLEditor is an Eclipse plug-in to help web development.
10 | Provides HTML, XML, JSP, CSS and JavaScript editor which have
11 | syntax-highlighting, code-completion, validation and more powerful features.
12 |
13 |
14 | Table of Contents
15 |
16 | Installing
17 | Editors
18 |
19 | HTML Editor
20 | XML Editor
21 | JSP Editor
22 | JavaScript Editor
23 | CSS Editor
24 |
25 |
26 | Wizards
27 |
28 | HTML Creation Wizard
29 | XML Creation Wizard
30 | JSP Creation Wizard
31 |
32 |
33 | Views
34 |
35 | Palette
36 | Image
37 | CSS Preview
38 |
39 |
40 | Preferences
41 |
42 |
43 | Resources
44 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/install/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | EclipseHTMLEditor User Guide
5 |
6 |
7 | Installing
8 |
9 | Software Requirements
10 |
21 |
22 | Installing the plugon
23 |
24 |
25 | Download and install EclipseHTMLEditor from
26 | https://sourceforge.jp/projects/amateras/files/?release_id=29403#29403 .
27 |
28 | Unzip the downloaded file.
29 | Put unzipped folder jp.sf.amateras.htmleditor_x.x.x into ECLIPSE_HOME/plugins .
30 | Restart Eclipse.
31 |
32 |
33 |
34 | Note: SWT Browser widget (HTMLEditor uses it for preview HTML and JSP)
35 | requires Mozilla in the Linux. See details at The SWT FAQ .
36 | Also you can disable preview in the preference dialog.
37 | Select Window/Preferences/Amateras from menubar and check Disable Preview .
38 | Then you would be able to use HTMLEditor without Mozilla.
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/preferences/code_assist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/preferences/code_assist.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/preferences/css_editor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/preferences/css_editor.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/preferences/dtd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/preferences/dtd.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/preferences/preference.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/preferences/preference.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/preferences/project_config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/preferences/project_config.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/preferences/project_js_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/preferences/project_js_1.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/preferences/project_js_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/preferences/project_js_2.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/views/css_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/views/css_preview.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/views/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | EclipseHTMLEditor User Guide
5 |
6 |
7 | Views
8 |
9 | EclipseHTMLEditor provides following views:
10 |
11 |
16 |
17 | You can open these views Show View dialog
18 | (accessed via the menubar: Window/Show View/Other... )
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | Provides HTML / JSP tags. Clicking on a palette item inserts
27 | the corresponding tag into the active code editor, if applicable.
28 | You can also customize a palette to add new taglibs or your own templates from
29 | [image] icon.
30 |
31 |
32 |
33 |
34 |
35 | If StrutsIDE or FacesIDE has been installed, Struts / JSF tags would be added to the palette.
36 |
37 |
38 |
39 |
40 |
41 |
42 | Displays a preview of images in the folder currently selected in the Package Explorer.
43 | As shown at right, this view has 2 parts--a list of images, and a preview of the selected image.
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | Provides CSS preview when the CSS editor is active.
52 | This view displays HTML that applied CSS.HTML contents are generated by CSS dynamically.
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/views/palette.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/views/palette.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/wizards/add_js_libs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/wizards/add_js_libs.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/wizards/html_wizard_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/wizards/html_wizard_1.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/wizards/html_wizard_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/wizards/html_wizard_2.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/wizards/html_wizard_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/wizards/html_wizard_3.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/wizards/jsp_wizard_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/wizards/jsp_wizard_1.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/wizards/xml_wizard_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/wizards/xml_wizard_1.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/docs/wizards/xml_wizard_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/docs/wizards/xml_wizard_2.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/annotation.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/annotation.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/attlist.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/attlist.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/attribute.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/attribute.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/backward.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/backward.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/body.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/body.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/button.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/button.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/checkbox.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/checkbox.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/class.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/class.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/column.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/column.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/comment.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/comment.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/css.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/css.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/css_prop.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/css_prop.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/css_rule.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/css_rule.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/doctype.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/doctype.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/dtd.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/dtd.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/element.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/element.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/entity.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/entity.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/error.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/error.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/file.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/file.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/folder.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/folder.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/form.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/form.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/forward.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/forward.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/function.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/function.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/hidden.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/hidden.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/html.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/html.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/html.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/html.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/image.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/image.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/interface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/interface.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/jar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/jar.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/jar_ext.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/jar_ext.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/javascript.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/javascript.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/jsp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/jsp.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/label.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/label.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/link.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/link.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/list.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/list.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/notation.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/notation.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/output.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/output.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/package.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/package.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/package_empty.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/package_empty.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/palette.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/palette.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/panel.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/panel.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/password.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/password.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/properties.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/properties.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/radio.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/radio.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/refresh.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/refresh.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/run.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/run.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/select.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/select.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/sort.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/sort.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/table.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/table.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/tag.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/tag.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/template.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/template.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/text.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/text.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/textarea.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/textarea.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/title.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/title.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/value.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/value.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/var.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/var.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/web.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/web.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/xml.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/xml.png
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/icons/xsd.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/icons/xsd.gif
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/js/scriptaculous/1.8.1/sound.js:
--------------------------------------------------------------------------------
1 | // script.aculo.us sound.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
2 |
3 | // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
4 | //
5 | // Based on code created by Jules Gravinese (http://www.webveteran.com/)
6 | //
7 | // script.aculo.us is freely distributable under the terms of an MIT-style license.
8 | // For details, see the script.aculo.us web site: http://script.aculo.us/
9 |
10 | Sound = {
11 | tracks: {},
12 | _enabled: true,
13 | template:
14 | new Template(' '),
15 | enable: function(){
16 | Sound._enabled = true;
17 | },
18 | disable: function(){
19 | Sound._enabled = false;
20 | },
21 | play: function(url){
22 | if(!Sound._enabled) return;
23 | var options = Object.extend({
24 | track: 'global', url: url, replace: false
25 | }, arguments[1] || {});
26 |
27 | if(options.replace && this.tracks[options.track]) {
28 | $R(0, this.tracks[options.track].id).each(function(id){
29 | var sound = $('sound_'+options.track+'_'+id);
30 | sound.Stop && sound.Stop();
31 | sound.remove();
32 | })
33 | this.tracks[options.track] = null;
34 | }
35 |
36 | if(!this.tracks[options.track])
37 | this.tracks[options.track] = { id: 0 }
38 | else
39 | this.tracks[options.track].id++;
40 |
41 | options.id = this.tracks[options.track].id;
42 | $$('body')[0].insert(
43 | Prototype.Browser.IE ? new Element('bgsound',{
44 | id: 'sound_'+options.track+'_'+options.id,
45 | src: options.url, loop: 1, autostart: true
46 | }) : Sound.template.evaluate(options));
47 | }
48 | };
49 |
50 | if(Prototype.Browser.Gecko && navigator.userAgent.indexOf("Win") > 0){
51 | if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('QuickTime') != -1 }))
52 | Sound.template = new Template(' ')
53 | else
54 | Sound.play = function(){}
55 | }
56 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/lib/JavaScriptExecutor.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/lib/JavaScriptExecutor.jar
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/lib/commons-jxpath-1.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/lib/commons-jxpath-1.2.jar
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/lib/compiler.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/lib/compiler.jar
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/lib/dtdparser121.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/lib/dtdparser121.jar
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/lib/egen-develop.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/lib/egen-develop.jar
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/lib/fuzzyxml.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/lib/fuzzyxml.jar
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/lib/js.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/lib/js.jar
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/lib/jsp-api.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/lib/jsp-api.jar
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/lib/jtidy-8.0-20111220.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/lib/jtidy-8.0-20111220.jar
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/lib/org.apache.commons.jrcs.diff.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/lib/org.apache.commons.jrcs.diff.jar
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/lib/servlet-api.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/lib/servlet-api.jar
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/lib/ss_css2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/lib/ss_css2.jar
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/lib/trang.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/lib/trang.jar
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/lib/xercesImpl.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/lib/xercesImpl.jar
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/lib/xml-apis.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/lib/xml-apis.jar
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/license/trang_copying.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2002, 2003 Thai Open Source Software Center Ltd
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are
6 | met:
7 |
8 | Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 |
11 | Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the
14 | distribution.
15 |
16 | Neither the name of the Thai Open Source Software Center Ltd nor
17 | the names of its contributors may be used to endorse or promote
18 | products derived from this software without specific prior written
19 | permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/schema/customTagAttributeAssist.exsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/schema/customTagConverter.exsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/schema/customTagValidator.exsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/schema/fileAssistProcessor.exsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/schema/hyperlinkProvider.exsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/schema/noValidationNatures.exsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/schema/pagefilter.exsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/schema/paletteItem.exsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/schema/preferenceContributer.exsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/schema/tldLocator.exsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/TLD/permittedTaglibs.tld:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 | Restricts JSP pages to the JSTL tag libraries
9 |
10 | permittedTaglibs
11 | 1.1
12 | permittedTaglibs
13 | http://jakarta.apache.org/taglibs/standard/permittedTaglibs
14 |
15 |
16 |
17 | javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV
18 |
19 |
20 |
21 | Whitespace-separated list of taglib URIs to permit. This example
22 | TLD for the Standard Taglib allows only JSTL 'el' taglibs to be
23 | imported.
24 |
25 | permittedTaglibs
26 |
27 | http://java.sun.com/jsp/jstl/core
28 | http://java.sun.com/jsp/jstl/fmt
29 | http://java.sun.com/jsp/jstl/sql
30 | http://java.sun.com/jsp/jstl/xml
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/TLD/scriptfree.tld:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 | Validates JSP pages to prohibit use of scripting elements.
9 |
10 | 1.1
11 | scriptfree
12 | http://jakarta.apache.org/taglibs/standard/scriptfree
13 |
14 |
15 |
16 | Validates prohibitions against scripting elements.
17 |
18 |
19 | javax.servlet.jsp.jstl.tlv.ScriptFreeTLV
20 |
21 |
22 |
23 | Controls whether or not declarations are considered valid.
24 |
25 | allowDeclarations
26 | false
27 |
28 |
29 |
30 | Controls whether or not scriptlets are considered valid.
31 |
32 | allowScriptlets
33 | false
34 |
35 |
36 |
37 | Controls whether or not top-level expressions are considered valid.
38 |
39 | allowExpressions
40 | false
41 |
42 |
43 |
44 | Controls whether or not expressions used to supply request-time
45 | attribute values are considered valid.
46 |
47 | allowRTExpressions
48 | false
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/csseditor/editors/CSSBlockScanner.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.csseditor.editors;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import jp.sf.amateras.htmleditor.ColorProvider;
7 | import jp.sf.amateras.htmleditor.HTMLPlugin;
8 |
9 | import org.eclipse.jface.text.rules.IRule;
10 | import org.eclipse.jface.text.rules.RuleBasedScanner;
11 |
12 | /**
13 | * @author Naoki Takezoe
14 | */
15 | public class CSSBlockScanner extends RuleBasedScanner {
16 |
17 | public CSSBlockScanner(ColorProvider colorProvider){
18 | List rules = createRules(colorProvider);
19 | setRules(rules.toArray(new IRule[rules.size()]));
20 | }
21 |
22 | /**
23 | * Creates the list of IRule
.
24 | * If you have to customize rules, override this method.
25 | *
26 | * @param colorProvider ColorProvider
27 | * @return the list of IRule
28 | */
29 | protected List createRules(ColorProvider colorProvider){
30 | List rules = new ArrayList();
31 | rules.add(new CSSRule(
32 | colorProvider.getToken(HTMLPlugin.PREF_COLOR_CSSPROP),
33 | colorProvider.getToken(HTMLPlugin.PREF_COLOR_CSSVALUE)));
34 | return rules;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/csseditor/editors/CSSCharacterPairMatcher.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.csseditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.HTMLUtil;
4 | import jp.sf.amateras.htmleditor.editors.AbstractCharacterPairMatcher;
5 |
6 | import org.eclipse.jface.text.IDocument;
7 |
8 | /**
9 | * @author Naoki Takezoe
10 | */
11 | public class CSSCharacterPairMatcher extends AbstractCharacterPairMatcher {
12 |
13 | public CSSCharacterPairMatcher() {
14 | addBlockCharacter('{', '}');
15 | }
16 |
17 | @Override protected String getSource(IDocument document){
18 | return HTMLUtil.cssComment2space(document.get());
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/csseditor/editors/CSSFileDocumentProvider.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.csseditor.editors;
2 |
3 | import org.eclipse.core.runtime.CoreException;
4 | import org.eclipse.jface.text.IDocument;
5 | import org.eclipse.jface.text.IDocumentPartitioner;
6 | import org.eclipse.jface.text.rules.FastPartitioner;
7 | import org.eclipse.ui.editors.text.FileDocumentProvider;
8 |
9 | public class CSSFileDocumentProvider extends FileDocumentProvider {
10 | @Override public IDocument createDocument(Object element) throws CoreException {
11 | IDocument document = super.createDocument(element);
12 | if (document != null) {
13 | IDocumentPartitioner partitioner =
14 | new FastPartitioner(
15 | new CSSPartitionScanner(),
16 | new String[]{
17 | CSSPartitionScanner.CSS_COMMENT
18 | });
19 | partitioner.connect(document);
20 | document.setDocumentPartitioner(partitioner);
21 | }
22 | return document;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/csseditor/editors/CSSInfo.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.csseditor.editors;
2 |
3 | /**
4 | * @author Naoki Takezoe
5 | */
6 | public class CSSInfo {
7 |
8 | private String replaceString;
9 | private String displayString;
10 |
11 | public CSSInfo(String replaceString){
12 | this(replaceString,replaceString);
13 | }
14 |
15 | public CSSInfo(String replaceString,String displayString){
16 | this.replaceString = replaceString;
17 | this.displayString = displayString;
18 | }
19 |
20 | public String getDisplayString() {
21 | return displayString;
22 | }
23 |
24 | public String getReplaceString() {
25 | return replaceString;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/csseditor/editors/CSSPartitionScanner.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.csseditor.editors;
2 |
3 | import org.eclipse.jface.text.rules.IPredicateRule;
4 | import org.eclipse.jface.text.rules.IToken;
5 | import org.eclipse.jface.text.rules.MultiLineRule;
6 | import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
7 | import org.eclipse.jface.text.rules.Token;
8 |
9 | /**
10 | * @author Naoki Takezoe
11 | */
12 | public class CSSPartitionScanner extends RuleBasedPartitionScanner {
13 |
14 | public final static String CSS_COMMENT = "__css_comment";
15 |
16 | public CSSPartitionScanner(){
17 | IToken comment = new Token(CSS_COMMENT);
18 |
19 | IPredicateRule[] rules = new IPredicateRule[1];
20 | rules[0] = new MultiLineRule("/*" , "*/" ,comment);
21 |
22 | setPredicateRules(rules);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/csseditor/editors/CSSTextDocumentProvider.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.csseditor.editors;
2 |
3 | import org.eclipse.core.runtime.CoreException;
4 | import org.eclipse.jface.text.IDocument;
5 | import org.eclipse.jface.text.IDocumentPartitioner;
6 | import org.eclipse.jface.text.rules.FastPartitioner;
7 | import org.eclipse.ui.editors.text.TextFileDocumentProvider;
8 |
9 | /**
10 | * @author Naoki Takezoe
11 | */
12 | public class CSSTextDocumentProvider extends TextFileDocumentProvider {
13 |
14 | @Override protected FileInfo createFileInfo(Object element) throws CoreException {
15 | FileInfo info = super.createFileInfo(element);
16 | if(info==null){
17 | info = createEmptyFileInfo();
18 | }
19 | IDocument document = info.fTextFileBuffer.getDocument();
20 | if (document != null) {
21 | IDocumentPartitioner partitioner =
22 | new FastPartitioner(
23 | new CSSPartitionScanner(),
24 | new String[]{
25 | CSSPartitionScanner.CSS_COMMENT
26 | });
27 | partitioner.connect(document);
28 | document.setDocumentPartitioner(partitioner);
29 | }
30 | return info;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/csseditor/editors/ChooseColorAction.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.csseditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.HTMLPlugin;
4 | import jp.sf.amateras.htmleditor.HTMLUtil;
5 |
6 | import org.eclipse.jface.action.Action;
7 | import org.eclipse.jface.text.IDocument;
8 | import org.eclipse.jface.text.ITextSelection;
9 | import org.eclipse.swt.graphics.RGB;
10 | import org.eclipse.swt.widgets.ColorDialog;
11 | import org.eclipse.ui.IWorkbenchWindow;
12 | import org.eclipse.ui.PlatformUI;
13 | import org.eclipse.ui.editors.text.TextEditor;
14 |
15 | /**
16 | * This action opens {@link ColorDialog} and insert the selected color
17 | * into the caret position as "#RRGGBB" format.
18 | *
19 | * @see org.eclipse.swt.widgets.ColorDialog
20 | * @author Naoki Takezoe
21 | */
22 | public class ChooseColorAction extends Action {
23 |
24 | private TextEditor editor;
25 |
26 | public ChooseColorAction(TextEditor editor){
27 | super(HTMLPlugin.getResourceString("CSSEditor.ChooseColor"));
28 | this.editor = editor;
29 | }
30 |
31 | @Override public void run() {
32 | IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
33 | ColorDialog dialog = new ColorDialog(window.getShell());
34 | RGB color = dialog.open();
35 | if(color!=null){
36 | IDocument doc = editor.getDocumentProvider().getDocument(editor.getEditorInput());
37 | ITextSelection sel = (ITextSelection)editor.getSelectionProvider().getSelection();
38 | try {
39 | doc.replace(sel.getOffset(), 0, HTMLUtil.toHex(color));
40 | } catch(Exception ex){
41 | HTMLPlugin.logException(ex);
42 | }
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/dtdeditor/editors/DTDConfiguration.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.dtdeditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.ColorProvider;
4 | import jp.sf.amateras.htmleditor.HTMLPlugin;
5 | import jp.sf.amateras.htmleditor.assist.HTMLAssistProcessor;
6 | import jp.sf.amateras.htmleditor.editors.HTMLConfiguration;
7 | import jp.sf.amateras.htmleditor.editors.HTMLTagScanner;
8 |
9 | /**
10 | * @author Naoki Takezoe
11 | */
12 | public class DTDConfiguration extends HTMLConfiguration {
13 |
14 | private HTMLTagScanner tagScanner;
15 |
16 | public DTDConfiguration(ColorProvider colorProvider) {
17 | super(colorProvider);
18 | }
19 |
20 | @Override protected HTMLTagScanner getTagScanner() {
21 | if (tagScanner == null) {
22 | tagScanner = new DTDTagScanner(getColorProvider());
23 | tagScanner.setDefaultReturnToken(
24 | getColorProvider().getToken(HTMLPlugin.PREF_COLOR_TAG));
25 | }
26 | return tagScanner;
27 | }
28 |
29 | @Override protected HTMLAssistProcessor createAssistProcessor() {
30 | return new DTDAssistProcessor();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/dtdeditor/editors/DTDFileDocumentProvider.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.dtdeditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.editors.HTMLPartitionScanner;
4 |
5 | import org.eclipse.core.runtime.CoreException;
6 | import org.eclipse.jface.text.IDocument;
7 | import org.eclipse.jface.text.IDocumentPartitioner;
8 | import org.eclipse.jface.text.rules.FastPartitioner;
9 | import org.eclipse.ui.editors.text.FileDocumentProvider;
10 |
11 | public class DTDFileDocumentProvider extends FileDocumentProvider {
12 |
13 | @Override public IDocument createDocument(Object element) throws CoreException {
14 | IDocument document = super.createDocument(element);
15 | if (document != null) {
16 | IDocumentPartitioner partitioner =
17 | new FastPartitioner(
18 | new DTDPartitionScanner(),
19 | new String[] {
20 | HTMLPartitionScanner.HTML_TAG,
21 | HTMLPartitionScanner.HTML_COMMENT});
22 | partitioner.connect(document);
23 | document.setDocumentPartitioner(partitioner);
24 | }
25 | return document;
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/dtdeditor/editors/DTDPartitionScanner.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.dtdeditor.editors;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import jp.sf.amateras.htmleditor.editors.HTMLPartitionScanner;
7 |
8 | import org.eclipse.jface.text.rules.IPredicateRule;
9 | import org.eclipse.jface.text.rules.IToken;
10 | import org.eclipse.jface.text.rules.MultiLineRule;
11 | import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
12 | import org.eclipse.jface.text.rules.Token;
13 |
14 | /**
15 | *
16 | * @author Naoki Takezoe
17 | */
18 | public class DTDPartitionScanner extends RuleBasedPartitionScanner {
19 |
20 | public DTDPartitionScanner(){
21 | IToken htmlComment = new Token(HTMLPartitionScanner.HTML_COMMENT);
22 | IToken htmlTag = new Token(HTMLPartitionScanner.HTML_TAG);
23 | // IToken defaultToken = new Token(IDocument.DEFAULT_CONTENT_TYPE);
24 |
25 | List rules = new ArrayList();
26 |
27 | rules.add(new MultiLineRule("", htmlComment));
28 | rules.add(new MultiLineRule("<",">", htmlTag));
29 |
30 | setPredicateRules(rules.toArray(new IPredicateRule[rules.size()]));
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/dtdeditor/editors/DTDTagScanner.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.dtdeditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.ColorProvider;
4 | import jp.sf.amateras.htmleditor.HTMLPlugin;
5 | import jp.sf.amateras.htmleditor.editors.HTMLTagScanner;
6 | import jp.sf.amateras.htmleditor.editors.HTMLWhitespaceDetector;
7 |
8 | import org.eclipse.jface.text.rules.IRule;
9 | import org.eclipse.jface.text.rules.IToken;
10 | import org.eclipse.jface.text.rules.MultiLineRule;
11 | import org.eclipse.jface.text.rules.WhitespaceRule;
12 |
13 | /**
14 | * @author Naoki Takezoe
15 | */
16 | public class DTDTagScanner extends HTMLTagScanner {
17 |
18 | public DTDTagScanner(ColorProvider colorProvider) {
19 | super(colorProvider, false);
20 |
21 | IToken string = colorProvider.getToken(HTMLPlugin.PREF_COLOR_STRING);
22 |
23 | IRule[] rules = new IRule[3];
24 | rules[0] = new MultiLineRule("\"" , "\"" , string, '\\');
25 | rules[1] = new MultiLineRule("(" , ")" , string);
26 | rules[2] = new WhitespaceRule(new HTMLWhitespaceDetector());
27 |
28 | setRules(rules);
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/dtdeditor/editors/DTDTextDocumentProvider.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.dtdeditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.editors.HTMLPartitionScanner;
4 |
5 | import org.eclipse.core.runtime.CoreException;
6 | import org.eclipse.jface.text.IDocument;
7 | import org.eclipse.jface.text.IDocumentPartitioner;
8 | import org.eclipse.jface.text.rules.FastPartitioner;
9 | import org.eclipse.ui.editors.text.TextFileDocumentProvider;
10 |
11 | /**
12 | *
13 | * @author Naoki Takezoe
14 | */
15 | public class DTDTextDocumentProvider extends TextFileDocumentProvider {
16 |
17 | @Override protected FileInfo createFileInfo(Object element) throws CoreException {
18 | FileInfo info = super.createFileInfo(element);
19 | if(info==null){
20 | info = createEmptyFileInfo();
21 | }
22 | IDocument document = info.fTextFileBuffer.getDocument();
23 | if (document != null) {
24 | IDocumentPartitioner partitioner =
25 | new FastPartitioner(
26 | new DTDPartitionScanner(),
27 | new String[] {
28 | HTMLPartitionScanner.HTML_TAG,
29 | HTMLPartitionScanner.HTML_COMMENT});
30 | partitioner.connect(document);
31 | document.setDocumentPartitioner(partitioner);
32 | }
33 | return info;
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/AbstractServerPropertyPage.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor;
2 |
3 | import org.eclipse.core.resources.IProject;
4 | import org.eclipse.core.runtime.IAdaptable;
5 | import org.eclipse.swt.SWT;
6 | import org.eclipse.swt.layout.GridData;
7 | import org.eclipse.swt.layout.GridLayout;
8 | import org.eclipse.swt.widgets.Composite;
9 | import org.eclipse.swt.widgets.Control;
10 | import org.eclipse.swt.widgets.Label;
11 | import org.eclipse.swt.widgets.Text;
12 | import org.eclipse.ui.dialogs.PropertyPage;
13 |
14 | /**
15 | * A base class for server configuration property page.
16 | *
17 | * @author Naoki Takezoe
18 | * @since 2.0.6
19 | */
20 | public abstract class AbstractServerPropertyPage extends PropertyPage {
21 |
22 | private Text server;
23 | private Text context;
24 | private ServerConfig config;
25 |
26 | protected abstract String getPluginId();
27 |
28 | protected Control createContents(Composite parent) {
29 | config = new ServerConfig(getProject(), getPluginId());
30 |
31 | Composite composite = new Composite(parent, SWT.NULL);
32 | composite.setLayout(new GridLayout(2, false));
33 |
34 | new Label(composite, SWT.NULL).setText(HTMLPlugin.getResourceString("AbstractServerPropertyPage.Server"));
35 | server = new Text(composite, SWT.BORDER);
36 | server.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
37 | server.setText(config.getServer());
38 |
39 | new Label(composite, SWT.NULL).setText(HTMLPlugin.getResourceString("AbstractServerPropertyPage.Context"));
40 | context = new Text(composite, SWT.BORDER);
41 | context.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
42 | context.setText(config.getContext());
43 |
44 | return composite;
45 | }
46 |
47 | protected void performDefaults() {
48 | server.setText(config.getDefaultServer());
49 | server.setText(config.getDefaultContext());
50 | }
51 |
52 | public boolean performOk() {
53 | config.setServer(server.getText());
54 | config.setContext(context.getText());
55 | return true;
56 | }
57 |
58 | private IProject getProject(){
59 | IAdaptable adaptable = getElement();
60 | return (IProject) adaptable.getAdapter(IProject.class);
61 | }
62 |
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/CSSEditorPreferencePage.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor;
2 |
3 | import org.eclipse.jface.preference.ColorFieldEditor;
4 | import org.eclipse.jface.preference.FieldEditorPreferencePage;
5 | import org.eclipse.swt.widgets.Composite;
6 | import org.eclipse.ui.IWorkbench;
7 | import org.eclipse.ui.IWorkbenchPreferencePage;
8 |
9 | /**
10 | * The preference page for the CSS editor.
11 | *
12 | * @author Naoki Takezoe
13 | */
14 | public class CSSEditorPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
15 |
16 | private ColorFieldEditor colorComment;
17 | private ColorFieldEditor colorProperty;
18 | private ColorFieldEditor colorValue;
19 |
20 | public CSSEditorPreferencePage() {
21 | super(GRID); //$NON-NLS-1$
22 | setPreferenceStore(HTMLPlugin.getDefault().getPreferenceStore());
23 | }
24 |
25 | public void init(IWorkbench workbench) {
26 | }
27 |
28 | protected void createFieldEditors() {
29 | setTitle(HTMLPlugin.getResourceString("HTMLEditorPreferencePage.CSS"));
30 |
31 | Composite parent = getFieldEditorParent();
32 |
33 | colorComment = new ColorFieldEditor(HTMLPlugin.PREF_COLOR_CSSCOMMENT,
34 | HTMLPlugin.getResourceString("HTMLEditorPreferencePage.CSSCommentColor"),
35 | parent);
36 | addField(colorComment);
37 |
38 | colorProperty = new ColorFieldEditor(HTMLPlugin.PREF_COLOR_CSSPROP,
39 | HTMLPlugin.getResourceString("HTMLEditorPreferencePage.CSSPropColor"),
40 | parent);
41 | addField(colorProperty);
42 |
43 | colorValue = new ColorFieldEditor(HTMLPlugin.PREF_COLOR_CSSVALUE,
44 | HTMLPlugin.getResourceString("HTMLEditorPreferencePage.CSSValueColor"),
45 | parent);
46 | addField(colorValue);
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/HTMLPlugin.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/HTMLPlugin.java
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/HTMLProjectNature.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import org.eclipse.core.resources.ICommand;
7 | import org.eclipse.core.resources.IProject;
8 | import org.eclipse.core.resources.IProjectDescription;
9 | import org.eclipse.core.resources.IProjectNature;
10 | import org.eclipse.core.runtime.CoreException;
11 |
12 | /**
13 | *
14 | * @author Naoki Takezoe
15 | */
16 | public class HTMLProjectNature implements IProjectNature {
17 |
18 | public static final String HTML_NATURE_ID = "jp.sf.amateras.htmleditor.HTMLProjectNature";
19 | public static final String HTML_BUILDER_ID = "jp.sf.amateras.htmleditor.HTMLProjectBuilder";
20 | private IProject project;
21 |
22 | public void configure() throws CoreException {
23 | IProjectDescription desc = project.getDescription();
24 | ICommand[] commands = desc.getBuildSpec();
25 | for(int i=0;i list = new ArrayList();
45 | for(int i=0;i attrs,FuzzyXMLNode[] children,
16 | JSPInfo info, boolean fixPath);
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/ICustomTagConverterContributer.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor;
2 |
3 | /**
4 | * An interface to contribute ICustomTagConverter to ths JSP editor.
5 | *
6 | * @see jp.sf.amateras.htmleditor.ICustomTagConverter
7 | * @author Naoki Takezoe
8 | */
9 | public interface ICustomTagConverterContributer {
10 |
11 | /**
12 | * Returns a converter.
13 | * If this contributor don't have converter to process a tag which specified by an argument,
14 | * returns null.
15 | *
16 | * @param tagName a tag name
17 | * @return an instance of ICustomTagConverter or null
18 | */
19 | public ICustomTagConverter getConverter(String tagName);
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/ICustomTagValidator.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor;
2 |
3 | import java.util.Map;
4 |
5 | import jp.aonir.fuzzyxml.FuzzyXMLElement;
6 | import jp.sf.amateras.jspeditor.editors.IJSPValidationMarkerCreator;
7 | import jp.sf.amateras.jspeditor.editors.JSPInfo;
8 |
9 | /**
10 | * An interface to convert taglibs for HTML preview.
11 | *
12 | * @author Naoki Takezoe
13 | */
14 | public interface ICustomTagValidator {
15 |
16 | public void validate(IJSPValidationMarkerCreator creator,
17 | Map attrs,FuzzyXMLElement element,JSPInfo info);
18 |
19 | }
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/ICustomTagValidatorContributer.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor;
2 |
3 | /**
4 | * An interface to contribute ICustomTagConverter
to ths JSP editor.
5 | *
6 | * @see jp.sf.amateras.htmleditor.ICustomTagConverter
7 | * @author Naoki Takezoe
8 | */
9 | public interface ICustomTagValidatorContributer {
10 |
11 | /**
12 | * Returns a converter.
13 | *
14 | * If this contributor don't have converter to process a tag which specified by an argument,
15 | * returns null
.
16 | *
17 | * @param tagName a tag name
18 | * @return an instance of ICustomTagConverter or null
19 | */
20 | public ICustomTagValidator getConverter(String tagName);
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/IFileAssistProcessor.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor;
2 |
3 | import jp.sf.amateras.htmleditor.assist.AssistInfo;
4 |
5 | import org.eclipse.core.resources.IFile;
6 |
7 | public interface IFileAssistProcessor {
8 |
9 | public void reload(IFile file);
10 |
11 | public AssistInfo[] getAssistInfo(String value);
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/IHTMLPreferenceContributer.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor;
2 |
3 | import org.eclipse.jface.preference.IPreferenceStore;
4 |
5 | public interface IHTMLPreferenceContributer {
6 |
7 | public void initializeDefaultPreferences(IPreferenceStore store );
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/IHyperlinkProvider.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor;
2 |
3 | import jp.aonir.fuzzyxml.FuzzyXMLDocument;
4 | import jp.aonir.fuzzyxml.FuzzyXMLElement;
5 | import jp.sf.amateras.htmleditor.editors.HTMLHyperlinkInfo;
6 |
7 | import org.eclipse.core.resources.IFile;
8 |
9 | /**
10 | * This provides additional hyperlinks to the HTMLSourceEditor
.
11 | *
12 | * @author Naoki Takezoe
13 | * @see jp.sf.amateras.htmleditor.HTMLHyperlinkDetector
14 | */
15 | public interface IHyperlinkProvider {
16 |
17 | /**
18 | * This method returns a target object of hyperlink.
19 | * If this provider doesn't support specified arguments, returns null.
20 | *
21 | * @param file the IFile
instance
22 | * @param doc a document object of FuzzyXML
23 | * @param element an element that are calet position
24 | * @param attrName an attribute name that are calet position
25 | * @param attrValue an attribute value that are calet position
26 | * @return
27 | *
28 | * IFile
29 | * IJavaElement
30 | * null
31 | *
32 | */
33 | public HTMLHyperlinkInfo getHyperlinkInfo(IFile file,FuzzyXMLDocument doc,
34 | FuzzyXMLElement element,String attrName,String attrValue,int offset);
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/JSPEditorPreferencePage.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor;
2 |
3 | import org.eclipse.jface.preference.BooleanFieldEditor;
4 | import org.eclipse.jface.preference.ColorFieldEditor;
5 | import org.eclipse.jface.preference.FieldEditorPreferencePage;
6 | import org.eclipse.swt.widgets.Composite;
7 | import org.eclipse.ui.IWorkbench;
8 | import org.eclipse.ui.IWorkbenchPreferencePage;
9 |
10 | /**
11 | * @author Naoki Takezoe
12 | */
13 | public class JSPEditorPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
14 |
15 | public JSPEditorPreferencePage() {
16 | super(GRID); //$NON-NLS-1$
17 | setPreferenceStore(HTMLPlugin.getDefault().getPreferenceStore());
18 | }
19 |
20 | public void init(IWorkbench workbench) {
21 | }
22 |
23 | protected void createFieldEditors() {
24 | setTitle(HTMLPlugin.getResourceString("HTMLEditorPreferencePage.JSP"));
25 |
26 | Composite parent = getFieldEditorParent();
27 |
28 | addField(new ColorFieldEditor(HTMLPlugin.PREF_JSP_COMMENT,
29 | HTMLPlugin.getResourceString("HTMLEditorPreferencePage.JSPCommentColor"),
30 | parent));
31 |
32 | addField(new ColorFieldEditor(HTMLPlugin.PREF_JSP_STRING,
33 | HTMLPlugin.getResourceString("HTMLEditorPreferencePage.JSPStringColor"),
34 | parent));
35 |
36 | addField(new ColorFieldEditor(HTMLPlugin.PREF_JSP_KEYWORD,
37 | HTMLPlugin.getResourceString("HTMLEditorPreferencePage.JSPKeywordColor"),
38 | parent));
39 |
40 | addField(new ColorFieldEditor(HTMLPlugin.PREF_COLOR_TAGLIB,
41 | HTMLPlugin.getResourceString("HTMLEditorPreferencePage.JSPTaglibColor"),
42 | parent));
43 |
44 | addField(new ColorFieldEditor(HTMLPlugin.PREF_COLOR_TAGLIB_ATTR,
45 | HTMLPlugin.getResourceString("HTMLEditorPreferencePage.JSPTaglibAttrColor"),
46 | parent));
47 |
48 | addField(new BooleanFieldEditor(HTMLPlugin.PREF_JSP_FIX_PATH,
49 | HTMLPlugin.getResourceString("HTMLEditorPreferencePage.JSPFixPath"),
50 | parent));
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/JavaScriptEditorPreferencePage.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor;
2 |
3 | import org.eclipse.jface.preference.ColorFieldEditor;
4 | import org.eclipse.jface.preference.FieldEditorPreferencePage;
5 | import org.eclipse.swt.widgets.Composite;
6 | import org.eclipse.ui.IWorkbench;
7 | import org.eclipse.ui.IWorkbenchPreferencePage;
8 |
9 | /**
10 | * @author Naoki Takezoe
11 | */
12 | public class JavaScriptEditorPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
13 |
14 | private ColorFieldEditor colorComment;
15 | private ColorFieldEditor colorJsdoc;
16 | private ColorFieldEditor colorString;
17 | private ColorFieldEditor colorKeyword;
18 |
19 | public JavaScriptEditorPreferencePage() {
20 | super(GRID); //$NON-NLS-1$
21 | setPreferenceStore(HTMLPlugin.getDefault().getPreferenceStore());
22 | }
23 |
24 | public void init(IWorkbench workbench) {
25 | }
26 |
27 | protected void createFieldEditors() {
28 | setTitle(HTMLPlugin.getResourceString("HTMLEditorPreferencePage.JavaScript"));
29 |
30 | Composite parent = getFieldEditorParent();
31 |
32 | colorComment = new ColorFieldEditor(HTMLPlugin.PREF_COLOR_JSCOMMENT,
33 | HTMLPlugin.getResourceString("HTMLEditorPreferencePage.JavaScriptCommentColor"),
34 | parent); //$NON-NLS-1$
35 | addField(colorComment);
36 |
37 | colorJsdoc = new ColorFieldEditor(HTMLPlugin.PREF_COLOR_JSDOC,
38 | "JSDoc",
39 | parent); //$NON-NLS-1$
40 | addField(colorJsdoc);
41 |
42 | colorString = new ColorFieldEditor(HTMLPlugin.PREF_COLOR_JSSTRING,
43 | HTMLPlugin.getResourceString("HTMLEditorPreferencePage.JavaScriptStringColor"),
44 | parent); //$NON-NLS-1$
45 | addField(colorString);
46 |
47 | colorKeyword = new ColorFieldEditor(HTMLPlugin.PREF_COLOR_JSKEYWORD,
48 | HTMLPlugin.getResourceString("HTMLEditorPreferencePage.JavaScriptKeywordColor"),
49 | parent); //$NON-NLS-1$
50 | addField(colorKeyword);
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/JavaUtil.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/JavaUtil.java
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/ServerConfig.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor;
2 |
3 | import org.eclipse.core.resources.IProject;
4 | import org.eclipse.core.resources.ProjectScope;
5 | import org.eclipse.jface.preference.IPreferenceStore;
6 | import org.eclipse.ui.preferences.ScopedPreferenceStore;
7 |
8 | /**
9 | * An data object which has server configurations.
10 | *
11 | * @author Naoki Takezoe
12 | * @since 2.0.6
13 | */
14 | public class ServerConfig {
15 |
16 | private static final String PREF_SERVER = "faceside.pref.server";
17 | private static final String PREF_CONTEXT = "faceside.pref.context";
18 |
19 | private IPreferenceStore store;
20 | private IProject project;
21 |
22 | public ServerConfig(IProject project, String pluginId){
23 | this.store = new ScopedPreferenceStore(
24 | new ProjectScope(project), pluginId);
25 | this.project = project;
26 | }
27 |
28 | public String getServer(){
29 | String server = store.getString(PREF_SERVER);
30 | if(server==null || server.length()==0){
31 | server = getDefaultServer();
32 | }
33 | return server;
34 | }
35 |
36 | public void setServer(String server){
37 | store.setValue(PREF_SERVER, server);
38 | }
39 |
40 | public String getDefaultServer(){
41 | return "http://localhost:8080";
42 | }
43 |
44 | public String getContext(){
45 | String context = store.getString(PREF_CONTEXT);
46 | if(context==null || context.length()==0){
47 | context = getDefaultContext();
48 | }
49 | return context;
50 | }
51 |
52 | public void setContext(String context){
53 | store.setValue(PREF_CONTEXT, context);
54 | }
55 |
56 | public String getDefaultContext(){
57 | return "/" + project.getName();
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/StringUtils.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor;
2 |
3 | /**
4 | * Provides utility methods for string operation.
5 | *
6 | * @author Naoki Takezoe
7 | */
8 | public class StringUtils {
9 |
10 | public static boolean isEmpty(String value){
11 | return value == null || value.length() == 0;
12 | }
13 |
14 | public static boolean isNotEmpty(String value){
15 | return !isEmpty(value);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/WebAppClasspathVariableInitializer.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 | import java.net.URL;
6 |
7 | import org.eclipse.core.runtime.FileLocator;
8 | import org.eclipse.core.runtime.Path;
9 | import org.eclipse.jdt.core.ClasspathVariableInitializer;
10 | import org.eclipse.jdt.core.JavaCore;
11 | import org.eclipse.jdt.core.JavaModelException;
12 | import org.osgi.framework.Bundle;
13 |
14 | /**
15 | * Provides the classpath variable WEBAPP_LIBS
.
16 | *
17 | * This variable points jp.sf.amateras.htmleditor/lib.
18 | * This folder has following jar files:
19 | *
20 | * servlet-api.jar
21 | * jsp-api.jar
22 | *
23 | *
24 | * @author Naoki Takezoe
25 | * @since 2.0.3
26 | */
27 | public class WebAppClasspathVariableInitializer extends
28 | ClasspathVariableInitializer {
29 |
30 | public void initialize(String variable) {
31 | Bundle bundle = HTMLPlugin.getDefault().getBundle();
32 | if(bundle==null){
33 | JavaCore.removeClasspathVariable(variable, null);
34 | return;
35 | }
36 | URL installLocation = bundle.getEntry("/");
37 | URL local = null;
38 | try {
39 | local = FileLocator.toFileURL(installLocation);
40 | } catch(IOException e){
41 | JavaCore.removeClasspathVariable(variable, null);
42 | return;
43 | }
44 | try {
45 | String fullpath = new File(local.getPath(), "lib").getAbsolutePath();
46 | JavaCore.setClasspathVariable(variable, new Path(fullpath), null);
47 | } catch(JavaModelException e){
48 | JavaCore.removeClasspathVariable(variable, null);
49 | }
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/assist/AttributeValueDefinition.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.assist;
2 |
3 | import java.util.Arrays;
4 | import java.util.HashMap;
5 | import java.util.Map;
6 |
7 | public class AttributeValueDefinition {
8 |
9 | /** attribute value proposals of align attribute */
10 | private static final String[] align = {
11 | "left","center","right"
12 | };
13 |
14 | /** attribute value proposals of valign attribute */
15 | private static final String[] valign = {
16 | "top","middle","bottom"
17 | };
18 |
19 | /** attribute value proposals of type attribute of input element */
20 | private static final String[] inputType = {
21 | "text","password","hidden","checkbox",
22 | "radio","button","reset","submit","file"
23 | };
24 |
25 | /** attribute value proposals of target attribute */
26 | private static final String[] target = {
27 | "_blank","_self","_parent", "_top"
28 | };
29 |
30 | private static Map map = new HashMap();
31 |
32 | static {
33 | addAttributeValues(AttributeInfo.ALIGN,align);
34 | addAttributeValues(AttributeInfo.VALIGN,valign);
35 | addAttributeValues(AttributeInfo.INPUT_TYPE,inputType);
36 | addAttributeValues(AttributeInfo.TARGET,target);
37 | }
38 |
39 | private static void addAttributeValues(int type,String[] values){
40 | Arrays.sort(values);
41 | map.put(new Integer(type),values);
42 | }
43 |
44 | public static String[] getAttributeValues(int type){
45 | Integer key = new Integer(type);
46 | if(map.get(key)==null){
47 | return new String[0];
48 | }
49 | return map.get(key);
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/assist/CSSAssistProcessor.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/assist/CSSAssistProcessor.java
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/assist/CustomAttribute.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.assist;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import jp.sf.amateras.htmleditor.HTMLPlugin;
7 |
8 | import org.eclipse.jface.preference.IPreferenceStore;
9 |
10 | /**
11 | * @author Naoki Takezoe
12 | */
13 | public class CustomAttribute {
14 |
15 | private String targetTag;
16 | private String attributeName;
17 |
18 | public CustomAttribute(String targetTag, String attributeName){
19 | this.targetTag = targetTag;
20 | this.attributeName = attributeName;
21 | }
22 |
23 | public String getAttributeName() {
24 | return attributeName;
25 | }
26 |
27 | public void setAttributeName(String attributeName) {
28 | this.attributeName = attributeName;
29 | }
30 |
31 | public String getTargetTag() {
32 | return targetTag;
33 | }
34 |
35 | public void setTargetTag(String targetTag) {
36 | this.targetTag = targetTag;
37 | }
38 |
39 | public static List loadFromPreference(boolean defaults){
40 | IPreferenceStore store = HTMLPlugin.getDefault().getPreferenceStore();
41 | String value = null;
42 | if(defaults){
43 | value = store.getDefaultString(HTMLPlugin.PREF_CUSTOM_ATTRS);
44 | } else {
45 | value = store.getString(HTMLPlugin.PREF_CUSTOM_ATTRS);
46 | }
47 | List list = new ArrayList();
48 | if(value!=null){
49 | String[] values = value.split("\n");
50 | for(int i=0;i list){
61 | IPreferenceStore store = HTMLPlugin.getDefault().getPreferenceStore();
62 | StringBuffer sb = new StringBuffer();
63 | for(int i=0;i loadFromPreference(boolean defaults){
38 | IPreferenceStore store = HTMLPlugin.getDefault().getPreferenceStore();
39 | String value = null;
40 | if(defaults){
41 | value = store.getDefaultString(HTMLPlugin.PREF_CUSTOM_ELEMENTS);
42 | } else {
43 | value = store.getString(HTMLPlugin.PREF_CUSTOM_ELEMENTS);
44 | }
45 | List list = new ArrayList();
46 | if(value!=null){
47 | String[] values = value.split("\n");
48 | for(int i=0;i list){
59 | IPreferenceStore store = HTMLPlugin.getDefault().getPreferenceStore();
60 | StringBuffer sb = new StringBuffer();
61 | for(int i=0;i", token);
14 | }
15 |
16 | protected boolean endSequenceDetected(ICharacterScanner scanner) {
17 |
18 | int c;
19 | boolean quoted = false;
20 |
21 | char[][] delimiters= scanner.getLegalLineDelimiters();
22 | boolean previousWasEscapeCharacter = false;
23 | while ((c= scanner.read()) != ICharacterScanner.EOF) {
24 | if (c == fEscapeCharacter) {
25 | // Skip the escaped character.
26 | scanner.read();
27 | } else if(c=='['){
28 | quoted = true;
29 | } else if(c==']'){
30 | quoted = false;
31 | } else if (fEndSequence.length > 0 && c == fEndSequence[0]) {
32 | // Check if the specified end sequence has been found.
33 | if (quoted==false && sequenceDetected(scanner, fEndSequence, true))
34 | return true;
35 | } else if (fBreaksOnEOL) {
36 | // Check for end of line since it can be used to terminate the pattern.
37 | for (int i= 0; i < delimiters.length; i++) {
38 | if (c == delimiters[i][0] && sequenceDetected(scanner, delimiters[i], true)) {
39 | if (!fEscapeContinuesLine || !previousWasEscapeCharacter)
40 | return true;
41 | }
42 | }
43 | }
44 | previousWasEscapeCharacter = (c == fEscapeCharacter);
45 | }
46 | if (fBreaksOnEOF) return true;
47 | scanner.unread();
48 | return false;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/HTMLCharacterPairMatcher.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | import jp.aonir.fuzzyxml.internal.FuzzyXMLUtil;
4 | import jp.sf.amateras.htmleditor.HTMLUtil;
5 |
6 | import org.eclipse.jface.text.IDocument;
7 |
8 | /**
9 | * @author Naoki Takezoe
10 | */
11 | public class HTMLCharacterPairMatcher extends AbstractCharacterPairMatcher {
12 |
13 | public HTMLCharacterPairMatcher() {
14 | addQuoteCharacter('\'');
15 | addQuoteCharacter('"');
16 | addBlockCharacter('{', '}');
17 | addBlockCharacter('(', ')');
18 | addBlockCharacter('<', '>');
19 | }
20 |
21 | protected String getSource(IDocument doc){
22 | String text = doc.get();
23 | text = FuzzyXMLUtil.escapeString(text);
24 | text = HTMLUtil.comment2space(text, true);
25 | text = HTMLUtil.scriptlet2space(text, true);
26 | return text;
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/HTMLConfiguration.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/HTMLConfiguration.java
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/HTMLEditorContributor.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | import org.eclipse.ui.IActionBars;
4 | import org.eclipse.ui.IEditorPart;
5 | import org.eclipse.ui.IWorkbenchPage;
6 | import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
7 |
8 | public class HTMLEditorContributor extends MultiPageEditorActionBarContributor {
9 |
10 | protected HTMLSourceEditorContributer contributer = new HTMLSourceEditorContributer();
11 |
12 | public HTMLEditorContributor() {
13 | super();
14 | init();
15 | }
16 |
17 | protected void init(){
18 | contributer.addActionId(HTMLSourceEditor.ACTION_ESCAPE_HTML);
19 | contributer.addActionId(HTMLSourceEditor.ACTION_COMMENT);
20 | }
21 |
22 | public void init(IActionBars bars, IWorkbenchPage page) {
23 | super.init(bars, page);
24 | contributer.init(bars,page);
25 | }
26 |
27 | public void setActivePage(IEditorPart activeEditor) {
28 | if(activeEditor instanceof HTMLSourceEditor){
29 | } else {
30 | }
31 | }
32 |
33 | public void setActiveEditor(IEditorPart part) {
34 | if(part instanceof HTMLEditor){
35 | part = ((HTMLEditor)part).getPaletteTarget();
36 | contributer.setActiveEditor(part);
37 | }
38 | super.setActiveEditor(part);
39 | }
40 |
41 | public void dispose(){
42 | contributer.dispose();
43 | super.dispose();
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/HTMLEditorPart.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | import org.eclipse.swt.browser.Browser;
4 |
5 | /**
6 | * This interface is implemented by an EditPart of HTML editor.
7 | */
8 | public interface HTMLEditorPart {
9 |
10 | public Browser getBrowser();
11 |
12 | public HTMLSourceEditor getSourceEditor();
13 |
14 | public boolean isFileEditorInput();
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/HTMLFileDocumentProvider.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | import org.eclipse.core.runtime.CoreException;
4 | import org.eclipse.jface.text.IDocument;
5 | import org.eclipse.jface.text.IDocumentPartitioner;
6 | import org.eclipse.jface.text.rules.FastPartitioner;
7 | import org.eclipse.ui.editors.text.FileDocumentProvider;
8 |
9 | public class HTMLFileDocumentProvider extends FileDocumentProvider {
10 |
11 | public IDocument createDocument(Object element) throws CoreException {
12 | IDocument document = super.createDocument(element);
13 | if(document!=null){
14 | IDocumentPartitioner partitioner =
15 | new FastPartitioner(
16 | new HTMLPartitionScanner(),
17 | new String[]{
18 | HTMLPartitionScanner.HTML_TAG,
19 | HTMLPartitionScanner.HTML_COMMENT,
20 | HTMLPartitionScanner.HTML_SCRIPT,
21 | HTMLPartitionScanner.HTML_DOCTYPE,
22 | HTMLPartitionScanner.HTML_DIRECTIVE,
23 | HTMLPartitionScanner.JAVASCRIPT,
24 | HTMLPartitionScanner.HTML_CSS});
25 | partitioner.connect(document);
26 | document.setDocumentPartitioner(partitioner);
27 | }
28 | return document;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/HTMLHyperlinkInfo.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | public class HTMLHyperlinkInfo {
4 |
5 | private Object obj;
6 | private int offset;
7 | private int length;
8 | private int targetOffset = -1;
9 |
10 | public int getLength() {
11 | return length;
12 | }
13 | public void setLength(int length) {
14 | this.length = length;
15 | }
16 |
17 | public Object getObject() {
18 | return obj;
19 | }
20 |
21 | public void setObject(Object obj) {
22 | this.obj = obj;
23 | }
24 |
25 | public int getOffset() {
26 | return offset;
27 | }
28 |
29 | public void setOffset(int offset) {
30 | this.offset = offset;
31 | }
32 |
33 | public int getTargetOffset() {
34 | return targetOffset;
35 | }
36 |
37 | public void setTargetOffset(int targetOffset) {
38 | this.targetOffset = targetOffset;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/HTMLScanner.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.ColorProvider;
4 |
5 | import org.eclipse.jface.text.rules.IRule;
6 | import org.eclipse.jface.text.rules.RuleBasedScanner;
7 | import org.eclipse.jface.text.rules.WhitespaceRule;
8 |
9 | public class HTMLScanner extends RuleBasedScanner {
10 |
11 | public HTMLScanner(ColorProvider colorProvider) {
12 | // IToken procInstr = colorProvider.getToken(HTMLPlugin.PREF_COLOR_DOCTYPE);
13 |
14 | IRule[] rules = new IRule[1];
15 | rules[0] = new WhitespaceRule(new HTMLWhitespaceDetector());
16 |
17 | setRules(rules);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/HTMLTagScanner.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.ColorProvider;
4 | import jp.sf.amateras.htmleditor.HTMLPlugin;
5 |
6 | import org.eclipse.jface.text.rules.IRule;
7 | import org.eclipse.jface.text.rules.IToken;
8 | import org.eclipse.jface.text.rules.MultiLineRule;
9 | import org.eclipse.jface.text.rules.RuleBasedScanner;
10 | import org.eclipse.jface.text.rules.WhitespaceRule;
11 |
12 | public class HTMLTagScanner extends RuleBasedScanner {
13 |
14 | public HTMLTagScanner(ColorProvider colorProvider, boolean bold) {
15 | IToken string = null;
16 | if(bold){
17 | string = colorProvider.getToken(HTMLPlugin.PREF_COLOR_TAGLIB_ATTR);
18 | } else {
19 | string = colorProvider.getToken(HTMLPlugin.PREF_COLOR_STRING);
20 | }
21 | IRule[] rules = new IRule[3];
22 |
23 | rules[0] = new MultiLineRule("\"" , "\"" , string, '\\');
24 | rules[1] = new MultiLineRule("'" , "'" , string, '\\');
25 | rules[2] = new WhitespaceRule(new HTMLWhitespaceDetector());
26 |
27 | setRules(rules);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/HTMLTextDocumentProvider.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | import org.eclipse.core.runtime.CoreException;
4 | import org.eclipse.jface.text.IDocument;
5 | import org.eclipse.jface.text.IDocumentPartitioner;
6 | import org.eclipse.jface.text.rules.FastPartitioner;
7 | import org.eclipse.ui.editors.text.TextFileDocumentProvider;
8 |
9 | public class HTMLTextDocumentProvider extends TextFileDocumentProvider {
10 |
11 | protected FileInfo createFileInfo(Object element) throws CoreException {
12 | FileInfo info = super.createFileInfo(element);
13 | if(info==null){
14 | info = createEmptyFileInfo();
15 | }
16 | IDocument document = info.fTextFileBuffer.getDocument();
17 | if (document != null) {
18 | IDocumentPartitioner partitioner =
19 | new FastPartitioner(
20 | new HTMLPartitionScanner(),
21 | new String[] {
22 | HTMLPartitionScanner.HTML_TAG,
23 | HTMLPartitionScanner.PREFIX_TAG,
24 | HTMLPartitionScanner.HTML_COMMENT,
25 | HTMLPartitionScanner.HTML_SCRIPT,
26 | HTMLPartitionScanner.HTML_DOCTYPE,
27 | HTMLPartitionScanner.HTML_DIRECTIVE,
28 | HTMLPartitionScanner.JAVASCRIPT,
29 | HTMLPartitionScanner.HTML_CSS});
30 | partitioner.connect(document);
31 | document.setDocumentPartitioner(partitioner);
32 | }
33 | return info;
34 | }
35 |
36 | }
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/HTMLWhitespaceDetector.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | import org.eclipse.jface.text.rules.IWhitespaceDetector;
4 |
5 | public class HTMLWhitespaceDetector implements IWhitespaceDetector {
6 |
7 | public boolean isWhitespace(char c) {
8 | return (c == ' ' || c == '\t' || c == '\n' || c == '\r');
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/IHTMLColorConstants.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | import org.eclipse.swt.graphics.RGB;
4 |
5 | /** Defines initial colors used in editors. */
6 | public interface IHTMLColorConstants {
7 | RGB HTML_COMMENT = new RGB(128, 0, 0);
8 | RGB PROC_INSTR = new RGB(128, 128, 128);
9 | RGB STRING = new RGB( 0, 128, 0);
10 | RGB DEFAULT = new RGB( 0, 0, 0);
11 | RGB TAG = new RGB( 0, 0, 128);
12 | RGB SCRIPT = new RGB(255, 0, 0);
13 | RGB CSS_PROP = new RGB( 0, 0, 255);
14 | RGB CSS_COMMENT = new RGB(128, 0, 0);
15 | RGB CSS_VALUE = new RGB( 0, 128, 0);
16 | RGB FOREGROUND = new RGB( 0, 0, 0);
17 | RGB BACKGROUND = new RGB(255, 255, 255);
18 | RGB JAVA_COMMENT = new RGB( 0, 128, 0);
19 | RGB JAVA_STRING = new RGB( 0, 0, 255);
20 | RGB JAVA_KEYWORD = new RGB(128, 0, 128);
21 | RGB TAGLIB = new RGB(255, 0, 0);
22 | RGB TAGLIB_ATTR = new RGB(128, 128, 0);
23 | RGB JSDOC = new RGB(128, 128, 255);
24 | }
25 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/IHTMLOutlinePage.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
4 |
5 | public interface IHTMLOutlinePage extends IContentOutlinePage {
6 |
7 | public void update();
8 |
9 | public void setSelection(int offset);
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/InnerCSSScanner.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import jp.sf.amateras.csseditor.editors.CSSBlockScanner;
7 | import jp.sf.amateras.htmleditor.ColorProvider;
8 | import jp.sf.amateras.htmleditor.HTMLPlugin;
9 |
10 | import org.eclipse.jface.text.rules.IRule;
11 | import org.eclipse.jface.text.rules.IToken;
12 | import org.eclipse.jface.text.rules.MultiLineRule;
13 | import org.eclipse.jface.text.rules.SingleLineRule;
14 |
15 | /**
16 | * RuleBasedScanner
for the inner CSS in the HTML.
17 | *
18 | * @author Naoki Takezoe
19 | * @see 2.0.3
20 | */
21 | public class InnerCSSScanner extends CSSBlockScanner {
22 |
23 | public InnerCSSScanner(ColorProvider colorProvider) {
24 | super(colorProvider);
25 | }
26 |
27 | @Override protected List createRules(ColorProvider colorProvider) {
28 | IToken tag = colorProvider.getToken(HTMLPlugin.PREF_COLOR_TAG);
29 | IToken comment = colorProvider.getToken(HTMLPlugin.PREF_COLOR_CSSCOMMENT);
30 |
31 | List rules = new ArrayList();
32 | rules.add(new SingleLineRule("", tag));
34 | rules.add(new MultiLineRule("/*", "*/", comment));
35 | rules.addAll(super.createRules(colorProvider));
36 |
37 | return rules;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/InnerJavaScriptScanner.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | import java.util.List;
4 |
5 | import jp.sf.amateras.htmleditor.ColorProvider;
6 | import jp.sf.amateras.htmleditor.HTMLPlugin;
7 | import jp.sf.amateras.jseditor.editors.JavaScriptScanner;
8 |
9 | import org.eclipse.jface.text.rules.IRule;
10 | import org.eclipse.jface.text.rules.IToken;
11 | import org.eclipse.jface.text.rules.MultiLineRule;
12 | import org.eclipse.jface.text.rules.SingleLineRule;
13 |
14 | /**
15 | * RuleBasedScanner
for the inner JavaScript in the HTML.
16 | *
17 | * @author Naoki Takezoe
18 | * @see 2.0.3
19 | */
20 | public class InnerJavaScriptScanner extends JavaScriptScanner {
21 |
22 | public InnerJavaScriptScanner(ColorProvider colorProvider) {
23 | super(colorProvider);
24 | }
25 |
26 | @Override protected List createRules(ColorProvider colorProvider) {
27 | IToken tag = colorProvider.getToken(HTMLPlugin.PREF_COLOR_TAG);
28 | IToken comment = colorProvider.getToken(HTMLPlugin.PREF_COLOR_JSCOMMENT);
29 | IToken jsdoc = colorProvider.getToken(HTMLPlugin.PREF_COLOR_JSDOC);
30 |
31 | List rules = super.createRules(colorProvider);
32 | rules.add(new SingleLineRule("", tag));
34 | rules.add(new MultiLineRule("/**", "*/", jsdoc));
35 | rules.add(new MultiLineRule("/*", "*/", comment));
36 |
37 | return rules;
38 | }
39 |
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/JavaWhitespaceDetector.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | import org.eclipse.jface.text.rules.IWhitespaceDetector;
4 |
5 | public class JavaWhitespaceDetector implements IWhitespaceDetector {
6 |
7 | /**
8 | * @see IWhitespaceDetector#isWhitespace
9 | */
10 | public boolean isWhitespace(char c) {
11 | return Character.isWhitespace(c);
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/JavaWordDetector.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | import org.eclipse.jface.text.rules.IWordDetector;
4 |
5 | public class JavaWordDetector implements IWordDetector {
6 |
7 | /*
8 | * @see IWordDetector#isWordStart
9 | */
10 | public boolean isWordStart(char c) {
11 | return Character.isJavaIdentifierStart(c);
12 | }
13 |
14 | /*
15 | * @see IWordDetector#isWordPart
16 | */
17 | public boolean isWordPart(char c) {
18 | return Character.isJavaIdentifierPart(c);
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/editors/SoftTabVerifyListener.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.HTMLPlugin;
4 |
5 | import org.eclipse.jface.util.PropertyChangeEvent;
6 | import org.eclipse.swt.events.VerifyEvent;
7 | import org.eclipse.swt.events.VerifyListener;
8 |
9 | public class SoftTabVerifyListener implements VerifyListener {
10 |
11 | private boolean useSoftTab;
12 | private String softTab;
13 |
14 | public void verifyText(VerifyEvent evt) {
15 | if(useSoftTab){
16 | if(evt.text.equals("\t")){
17 | evt.text = softTab;
18 | }
19 | }
20 | }
21 |
22 | public void preferenceChanged(PropertyChangeEvent event){
23 | String key = event.getProperty();
24 | if(key.equals(HTMLPlugin.PREF_USE_SOFTTAB)){
25 |
26 | Object value = event.getNewValue();
27 | boolean enable = false;
28 | if ( value instanceof String) {
29 | enable = Boolean.valueOf((String)value).booleanValue();
30 | }
31 | else if ( value instanceof Boolean) {
32 | enable = ((Boolean)value).booleanValue();
33 | }
34 | setUseSoftTab(enable);
35 | }
36 | if(key.equals(HTMLPlugin.PREF_SOFTTAB_WIDTH)){
37 | int width = ((Integer)event.getNewValue()).intValue();
38 | setSoftTabWidth(width);
39 | }
40 | }
41 |
42 | public void setUseSoftTab(boolean useSoftTab){
43 | this.useSoftTab = useSoftTab;
44 | }
45 |
46 | public void setSoftTabWidth(int softTabWidth){
47 | softTab = "";
48 | for(int i=0;i
22 | * null
- continue visiting
23 | * not null
- stop visiting and
24 | * JarAcceptor
returns this value
25 | *
26 | * @throws Exception Any error occured
27 | */
28 | public Object visit(ZipFile file, ZipEntry entry) throws Exception;
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/gefutils/JarAcceptor.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.gefutils;
2 |
3 | import java.io.File;
4 | import java.util.Enumeration;
5 | import java.util.jar.JarEntry;
6 | import java.util.jar.JarFile;
7 |
8 | import jp.sf.amateras.htmleditor.HTMLPlugin;
9 | import jp.sf.amateras.jspeditor.editors.TLDInfo;
10 |
11 | import org.eclipse.core.resources.IContainer;
12 | import org.eclipse.core.resources.IProject;
13 |
14 | /**
15 | * An acceptor for each entries of WEB-INF/lib/*.jar .
16 | *
17 | * @since 2.0.5
18 | * @author Naoki Takezoe
19 | * @see IJarVisitor
20 | */
21 | public class JarAcceptor {
22 |
23 | public static Object accept(IProject project, IJarVisitor visitor){
24 | try {
25 | IContainer container = TLDInfo.getBaseDir(project);
26 | File basedir = container.getLocation().makeAbsolute().toFile();
27 | return accept(basedir, visitor);
28 | } catch(Exception ex){
29 | HTMLPlugin.logException(ex);
30 | }
31 | return null;
32 | }
33 |
34 | public static Object accept(File basedir, IJarVisitor visitor){
35 | try {
36 | File lib = new File(basedir,"/WEB-INF/lib");
37 |
38 | if(lib.exists() && lib.isDirectory()){
39 | File[] files = lib.listFiles();
40 | try {
41 | for(int i=0;i e = jarFile.entries();
45 | while(e.hasMoreElements()){
46 | JarEntry entry = e.nextElement();
47 | Object result = visitor.visit(jarFile, entry);
48 | if(result != null){
49 | return result;
50 | }
51 | }
52 | }
53 | }
54 | } catch(Exception ex){
55 | HTMLPlugin.logException(ex);
56 | }
57 | }
58 | } catch(Exception ex){
59 | HTMLPlugin.logException(ex);
60 | }
61 |
62 | return null;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/gefutils/LabelArrowConnection.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.gefutils;
2 |
3 | import org.eclipse.draw2d.BendpointConnectionRouter;
4 | import org.eclipse.draw2d.ConnectionLocator;
5 | import org.eclipse.draw2d.Label;
6 | import org.eclipse.draw2d.PolygonDecoration;
7 | import org.eclipse.draw2d.PolylineConnection;
8 | import org.eclipse.swt.SWT;
9 | import org.eclipse.swt.graphics.Color;
10 | import org.eclipse.swt.widgets.Display;
11 |
12 | /**
13 | * @author Naoki Takezoe
14 | */
15 | public class LabelArrowConnection extends PolylineConnection {
16 |
17 | private Label label = new Label();
18 |
19 | public LabelArrowConnection(){
20 | this(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
21 | }
22 |
23 | public LabelArrowConnection(Color color){
24 | add(label, new ConnectionLocator(this, ConnectionLocator.MIDDLE));
25 | setConnectionRouter(new BendpointConnectionRouter());
26 | setTargetDecoration(new PolygonDecoration());
27 | if(color!=null){
28 | setForegroundColor(color);
29 | }
30 | }
31 |
32 | public Label getLabel(){
33 | return label;
34 | }
35 |
36 | public void setText(String text){
37 | label.setText(text);
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/gefutils/SpinnerFieldEditor.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.gefutils;
2 |
3 | import org.eclipse.jface.preference.FieldEditor;
4 | import org.eclipse.swt.SWT;
5 | import org.eclipse.swt.widgets.Composite;
6 | import org.eclipse.swt.widgets.Spinner;
7 |
8 | /**
9 | * The FieldEditor implementation for int values.
10 | * This FieldEditor edits int value using {@link org.eclipse.swt.widgets.Spinner}.
11 | *
12 | * @author Naoki Takezoe
13 | */
14 | public class SpinnerFieldEditor extends FieldEditor {
15 |
16 | private int min;
17 | private int max;
18 |
19 | private Spinner spinner;
20 |
21 | public SpinnerFieldEditor() {
22 | super();
23 | }
24 |
25 | public SpinnerFieldEditor(String name, String labelText, int min, int max, Composite parent) {
26 | this.min = min;
27 | this.max = max;
28 | init(name, labelText);
29 | createControl(parent);
30 | }
31 |
32 | protected void adjustForNumColumns(int numColumns) {
33 | }
34 |
35 | protected void doFillIntoGrid(Composite parent, int numColumns) {
36 | getLabelControl(parent);
37 | getSpinnerControl(parent);
38 | }
39 |
40 | protected void doLoad() {
41 | spinner.setSelection(
42 | getPreferenceStore().getInt(getPreferenceName()));
43 | }
44 |
45 | protected void doLoadDefault() {
46 | spinner.setSelection(
47 | getPreferenceStore().getDefaultInt(getPreferenceName()));
48 | }
49 |
50 | protected void doStore() {
51 | getPreferenceStore().setValue(getPreferenceName(), spinner.getSelection());
52 | }
53 |
54 | public int getNumberOfControls() {
55 | return 2;
56 | }
57 |
58 | protected Spinner getSpinnerControl(Composite parent){
59 | if(spinner==null){
60 | spinner = new Spinner(parent, SWT.BORDER);
61 | spinner.setMinimum(min);
62 | spinner.setMaximum(max);
63 | }
64 | return spinner;
65 | }
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/gefutils/TextAreaPropertyDescriptor.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.gefutils;
2 |
3 | import org.eclipse.jface.dialogs.Dialog;
4 | import org.eclipse.swt.SWT;
5 | import org.eclipse.swt.graphics.Point;
6 | import org.eclipse.swt.layout.GridData;
7 | import org.eclipse.swt.layout.GridLayout;
8 | import org.eclipse.swt.widgets.Composite;
9 | import org.eclipse.swt.widgets.Control;
10 | import org.eclipse.swt.widgets.Shell;
11 | import org.eclipse.swt.widgets.Text;
12 |
13 | /**
14 | * The property descriptor that edits the text by the textarea dialog.
15 | *
16 | * @author Naoki Takezoe
17 | */
18 | public class TextAreaPropertyDescriptor extends
19 | AbstractDialogPropertyDescriptor {
20 |
21 | public TextAreaPropertyDescriptor(Object id, String displayName) {
22 | super(id, displayName);
23 | }
24 |
25 | protected Object openDialogBox(Object obj, Control cellEditorWindow) {
26 | String value = (String)obj;
27 | TextAreaDialog dialog = new TextAreaDialog(cellEditorWindow.getShell(), value);
28 | if(dialog.open()==TextAreaDialog.OK){
29 | return dialog.getResult();
30 | }
31 | return null;
32 | }
33 |
34 | private class TextAreaDialog extends Dialog {
35 |
36 | private Text text;
37 | private String result;
38 | private String initValue;
39 |
40 | public TextAreaDialog(Shell parent, String initValue){
41 | super(parent);
42 | this.initValue = initValue;
43 | setShellStyle(getShellStyle()|SWT.RESIZE);
44 | }
45 |
46 | @Override protected Point getInitialSize() {
47 | return new Point(350, 300);
48 | }
49 |
50 | @Override protected Control createDialogArea(Composite parent) {
51 | getShell().setText(getDisplayName());
52 |
53 | Composite composite = new Composite(parent, SWT.NULL);
54 | composite.setLayout(new GridLayout());
55 | composite.setLayoutData(new GridData(GridData.FILL_BOTH));
56 |
57 | text = new Text(composite, SWT.MULTI|SWT.BORDER|SWT.H_SCROLL|SWT.V_SCROLL);
58 | text.setLayoutData(new GridData(GridData.FILL_BOTH));
59 | text.setText(this.initValue);
60 |
61 | return composite;
62 | }
63 |
64 | @Override protected void okPressed() {
65 | result = this.text.getText();
66 | super.okPressed();
67 | }
68 |
69 | public String getResult(){
70 | return this.result;
71 | }
72 |
73 | }
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/tasktag/HTMLTaskTagDetector.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.tasktag;
2 |
3 | import jp.aonir.fuzzyxml.FuzzyXMLComment;
4 | import jp.aonir.fuzzyxml.FuzzyXMLDocument;
5 | import jp.aonir.fuzzyxml.FuzzyXMLElement;
6 | import jp.aonir.fuzzyxml.FuzzyXMLNode;
7 | import jp.aonir.fuzzyxml.FuzzyXMLParser;
8 | import jp.aonir.fuzzyxml.FuzzyXMLText;
9 |
10 |
11 | /**
12 | * {@link ITaskTagDetector} implementation for HTML / XML / JSP.
13 | * This detector supports following extensions:
14 | *
15 | *
16 | * .html
17 | * .htm
18 | * .xml
19 | * .tld
20 | * .xsd
21 | * .jsp
22 | * .jspf
23 | * .jspx
24 | *
25 | *
26 | * @author Naoki Takezoe
27 | */
28 | public class HTMLTaskTagDetector extends AbstractTaskTagDetector {
29 |
30 | public HTMLTaskTagDetector(){
31 | addSupportedExtension("html");
32 | addSupportedExtension("htm");
33 | addSupportedExtension("xml");
34 | addSupportedExtension("tld");
35 | addSupportedExtension("xsd");
36 | addSupportedExtension("jsp");
37 | addSupportedExtension("jspf");
38 | addSupportedExtension("jspx");
39 | }
40 |
41 | public void doDetect() throws Exception {
42 | FuzzyXMLDocument doc = new FuzzyXMLParser().parse(this.contents);
43 | processElement(doc.getDocumentElement());
44 | }
45 |
46 | private void processElement(FuzzyXMLElement element){
47 | FuzzyXMLNode[] children = element.getChildren();
48 | for(int i=0;i")){
62 | value = value.substring(0, value.length()-4);
63 | }
64 | detectTaskTag(value, children[i].getOffset());
65 | }
66 | }
67 | // TODO Should support tags in Java comment
68 | }
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/tasktag/ITaskTagDetector.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.tasktag;
2 |
3 | import org.eclipse.core.resources.IFile;
4 |
5 | /**
6 | * The interface for TaskTag detectors.
7 | *
8 | * @author Naoki Takezoe
9 | * @see jp.sf.amateras.htmleditor.tasktag.TaskTag
10 | * @see jp.sf.amateras.htmleditor.HTMLProjectBuilder
11 | */
12 | public interface ITaskTagDetector {
13 |
14 | /**
15 | * If this detector supports the specified file,
16 | * return true
. Otherwise return false
.
17 | *
18 | * @param file the target file
19 | * @return true
or false
20 | */
21 | public boolean isSupported(IFile file);
22 |
23 | /**
24 | * Detects TaskTags.
25 | *
26 | * @param file the target file
27 | */
28 | public void detect(IFile file, TaskTag[] tags) throws Exception;
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/tasktag/JavaScriptTaskTagDetector.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.tasktag;
2 |
3 | import jp.sf.amateras.jseditor.editors.model.JavaScriptComment;
4 | import jp.sf.amateras.jseditor.editors.model.JavaScriptModel;
5 |
6 | /**
7 | * {@link ITaskTagDetector} implementation for JavaScript.
8 | * This detector supports following extensions:
9 | *
10 | *
13 | *
14 | * @author Naoki Takezoe
15 | */
16 | public class JavaScriptTaskTagDetector extends AbstractTaskTagDetector {
17 |
18 | public JavaScriptTaskTagDetector(){
19 | addSupportedExtension("js");
20 | }
21 |
22 | public void doDetect() throws Exception {
23 | JavaScriptModel model = new JavaScriptModel(null, this.contents);
24 | for (JavaScriptComment comment : model.getCommentList()) {
25 | detectTaskTag(comment.getText(), comment.getStart());
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/template/HTMLContextType.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.template;
2 |
3 | import jp.sf.amateras.htmleditor.HTMLPlugin;
4 |
5 | import org.eclipse.jface.text.templates.GlobalTemplateVariables;
6 | import org.eclipse.jface.text.templates.TemplateContextType;
7 |
8 | /**
9 | *
10 | * @author Naoki Takezoe
11 | */
12 | public class HTMLContextType extends TemplateContextType {
13 |
14 | public static final String CONTEXT_TYPE
15 | = HTMLPlugin.getDefault().getPluginId() + ".templateContextType.html";
16 |
17 | public HTMLContextType(){
18 | addResolver(new GlobalTemplateVariables.Cursor());
19 | addResolver(new GlobalTemplateVariables.WordSelection());
20 | addResolver(new GlobalTemplateVariables.LineSelection());
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/template/HTMLTemplateManager.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.template;
2 |
3 | import java.io.IOException;
4 |
5 | import jp.sf.amateras.htmleditor.HTMLPlugin;
6 |
7 | import org.eclipse.jface.preference.IPreferenceStore;
8 | import org.eclipse.jface.text.templates.ContextTypeRegistry;
9 | import org.eclipse.jface.text.templates.persistence.TemplateStore;
10 | import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
11 | import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
12 |
13 | /**
14 | *
15 | * @author Naoki Takezoe
16 | */
17 | public class HTMLTemplateManager {
18 |
19 | private static final String CUSTOM_TEMPLATES_KEY
20 | = HTMLPlugin.getDefault().getPluginId() + ".customtemplates";
21 |
22 | private static HTMLTemplateManager instance;
23 | private TemplateStore fStore;
24 | private ContributionContextTypeRegistry fRegistry;
25 |
26 | private HTMLTemplateManager(){
27 | }
28 |
29 | public static HTMLTemplateManager getInstance(){
30 | if(instance==null){
31 | instance = new HTMLTemplateManager();
32 | }
33 | return instance;
34 | }
35 |
36 | public TemplateStore getTemplateStore(){
37 | if (fStore == null){
38 | fStore = new ContributionTemplateStore(getContextTypeRegistry(),
39 | HTMLPlugin.getDefault().getPreferenceStore(), CUSTOM_TEMPLATES_KEY);
40 | try {
41 | fStore.load();
42 | } catch (IOException e){
43 | HTMLPlugin.logException(e);
44 | }
45 | }
46 | return fStore;
47 | }
48 |
49 | public ContextTypeRegistry getContextTypeRegistry(){
50 | if (fRegistry == null){
51 | fRegistry = new ContributionContextTypeRegistry();
52 | fRegistry.addContextType(HTMLContextType.CONTEXT_TYPE);
53 | fRegistry.addContextType(JavaScriptContextType.CONTEXT_TYPE);
54 | }
55 | return fRegistry;
56 | }
57 |
58 | public IPreferenceStore getPreferenceStore(){
59 | return HTMLPlugin.getDefault().getPreferenceStore();
60 | }
61 |
62 | // public void savePluginPreferences(){
63 | // HTMLPlugin.getDefault().savePluginPreferences();
64 | // }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/template/HTMLTemplatePreferencePage.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.template;
2 |
3 | import jp.sf.amateras.htmleditor.HTMLPlugin;
4 |
5 | import org.eclipse.ui.IWorkbenchPreferencePage;
6 | import org.eclipse.ui.texteditor.templates.TemplatePreferencePage;
7 |
8 | /**
9 | * The preference page for HTML code completion templates.
10 | *
11 | * @author Naoki Takezoe
12 | */
13 | public class HTMLTemplatePreferencePage extends TemplatePreferencePage implements IWorkbenchPreferencePage {
14 |
15 | /**
16 | * Constructor.
17 | */
18 | public HTMLTemplatePreferencePage() {
19 | try {
20 | setPreferenceStore(HTMLPlugin.getDefault().getPreferenceStore());
21 | setTemplateStore(HTMLTemplateManager.getInstance().getTemplateStore());
22 | setContextTypeRegistry(HTMLTemplateManager.getInstance().getContextTypeRegistry());
23 | } catch(Exception ex){
24 | ex.printStackTrace();
25 | }
26 | }
27 |
28 | protected boolean isShowFormatterSetting() {
29 | return false;
30 | }
31 |
32 | // public boolean performOk() {
33 | // boolean ok = super.performOk();
34 | // HTMLPlugin.getDefault().savePluginPreferences();
35 | // return ok;
36 | // }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/template/JavaScriptContextType.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.template;
2 |
3 | import jp.sf.amateras.htmleditor.HTMLPlugin;
4 |
5 | import org.eclipse.jface.text.templates.GlobalTemplateVariables;
6 | import org.eclipse.jface.text.templates.TemplateContextType;
7 |
8 | public class JavaScriptContextType extends TemplateContextType {
9 |
10 | public static final String CONTEXT_TYPE
11 | = HTMLPlugin.getDefault().getPluginId() + ".templateContextType.javascript";
12 |
13 | public JavaScriptContextType(){
14 | addResolver(new GlobalTemplateVariables.Cursor());
15 | addResolver(new GlobalTemplateVariables.WordSelection());
16 | addResolver(new GlobalTemplateVariables.LineSelection());
17 | addResolver(new GlobalTemplateVariables.User());
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/views/DefaultPaletteItem.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.views;
2 |
3 | import jp.sf.amateras.htmleditor.HTMLPlugin;
4 | import jp.sf.amateras.htmleditor.editors.HTMLSourceEditor;
5 |
6 | import org.eclipse.jface.resource.ImageDescriptor;
7 | import org.eclipse.jface.text.IDocument;
8 | import org.eclipse.jface.text.ITextSelection;
9 |
10 | /**
11 | * A default implementation of IPaletteItem.
12 | * This palette item inserts simple text.
13 | */
14 | public class DefaultPaletteItem implements IPaletteItem {
15 |
16 | private String name;
17 | private ImageDescriptor image;
18 | private String content;
19 |
20 | /**
21 | * The constructor.
22 | *
23 | * @param name item name
24 | * @param image icon
25 | * @param content insert text
26 | */
27 | public DefaultPaletteItem(String name,ImageDescriptor image,String content){
28 | this.name = name;
29 | this.image = image;
30 | this.content = content;
31 | }
32 |
33 | public ImageDescriptor getImageDescriptor() {
34 | return image;
35 | }
36 |
37 | public String getLabel() {
38 | return name;
39 | }
40 |
41 | public String getContent(){
42 | return this.content;
43 | }
44 |
45 | public void execute(HTMLSourceEditor editor){
46 | IDocument doc = editor.getDocumentProvider().getDocument(editor.getEditorInput());
47 | ITextSelection sel = (ITextSelection)editor.getSelectionProvider().getSelection();
48 | try {
49 | int caret = content.length();
50 | if(content.indexOf(">")!=-1){
51 | caret = content.indexOf(">") + 1;
52 | }
53 | doc.replace(sel.getOffset(),sel.getLength(),content);
54 | editor.selectAndReveal(sel.getOffset() + caret, 0);
55 | } catch(Exception ex){
56 | HTMLPlugin.logException(ex);
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/views/IPaletteContributer.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.views;
2 |
3 | public interface IPaletteContributer {
4 |
5 | public IPaletteItem[] getPaletteItems();
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/views/IPaletteItem.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.views;
2 |
3 | import jp.sf.amateras.htmleditor.editors.HTMLSourceEditor;
4 |
5 | import org.eclipse.jface.resource.ImageDescriptor;
6 |
7 | public interface IPaletteItem {
8 |
9 | public String getLabel();
10 |
11 | public ImageDescriptor getImageDescriptor();
12 |
13 | public void execute(HTMLSourceEditor editor);
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/views/IPaletteTarget.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.views;
2 |
3 | import jp.sf.amateras.htmleditor.editors.HTMLSourceEditor;
4 |
5 | public interface IPaletteTarget {
6 |
7 | public HTMLSourceEditor getPaletteTarget();
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/wizards/JSPNewWizard.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.htmleditor.wizards;
2 |
3 | import jp.sf.amateras.htmleditor.HTMLPlugin;
4 |
5 | import org.eclipse.core.resources.IFile;
6 | import org.eclipse.jface.viewers.ISelection;
7 | import org.eclipse.jface.viewers.IStructuredSelection;
8 | import org.eclipse.jface.wizard.Wizard;
9 | import org.eclipse.ui.INewWizard;
10 | import org.eclipse.ui.IWorkbench;
11 | import org.eclipse.ui.IWorkbenchPage;
12 | import org.eclipse.ui.PartInitException;
13 | import org.eclipse.ui.PlatformUI;
14 | import org.eclipse.ui.ide.IDE;
15 |
16 | public class JSPNewWizard extends Wizard implements INewWizard {
17 |
18 | private JSPNewWizardPage page;
19 | private ISelection selection;
20 |
21 | public JSPNewWizard() {
22 | super();
23 | setNeedsProgressMonitor(true);
24 | setWindowTitle(HTMLPlugin.getResourceString("JSPNewWizardPage.Title"));
25 | }
26 |
27 | public void addPages(){
28 | page = new JSPNewWizardPage(selection);
29 | addPage(page);
30 | }
31 |
32 | public boolean performFinish() {
33 | IFile file = page.createNewFile();
34 | if(file==null){
35 | return false;
36 | }
37 | try {
38 | IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
39 | IDE.openEditor(page, file, true);
40 | } catch(PartInitException ex){
41 | HTMLPlugin.logException(ex);
42 | return false;
43 | }
44 | return true;
45 | }
46 |
47 | public void init(IWorkbench workbench, IStructuredSelection selection) {
48 | this.selection = selection;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/wizards/JSPNewWizardPage.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/takezoe/amateras-html-editor/10df588e233a6f62d0c5e9cc67623033a3d1ee63/jp.sf.amateras.htmleditor/src/jp/sf/amateras/htmleditor/wizards/JSPNewWizardPage.java
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/JavaScriptCharacterPairMatcher.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.editors.AbstractCharacterPairMatcher;
4 |
5 | import org.eclipse.jface.text.IDocument;
6 |
7 | public class JavaScriptCharacterPairMatcher extends AbstractCharacterPairMatcher { //implements ICharacterPairMatcher {
8 |
9 | public JavaScriptCharacterPairMatcher() {
10 | addQuoteCharacter('\'');
11 | addQuoteCharacter('"');
12 | addBlockCharacter('{', '}');
13 | addBlockCharacter('(', ')');
14 | addBlockCharacter('[', ']');
15 | }
16 |
17 | protected String getSource(IDocument doc){
18 | return JavaScriptUtil.removeComments(doc.get());
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/JavaScriptDoubleClickStrategy.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors;
2 |
3 | import org.eclipse.jface.text.BadLocationException;
4 | import org.eclipse.jface.text.IDocument;
5 | import org.eclipse.jface.text.ITextDoubleClickStrategy;
6 | import org.eclipse.jface.text.ITextViewer;
7 |
8 | public class JavaScriptDoubleClickStrategy implements ITextDoubleClickStrategy {
9 | protected ITextViewer fText;
10 |
11 | public void doubleClicked(ITextViewer part) {
12 | int pos = part.getSelectedRange().x;
13 |
14 | if (pos < 0){
15 | return;
16 | }
17 |
18 | fText = part;
19 |
20 | selectWord(pos);
21 | }
22 |
23 | protected boolean selectWord(int caretPos) {
24 |
25 | IDocument doc = fText.getDocument();
26 | int startPos, endPos;
27 |
28 | try {
29 |
30 | int pos = caretPos;
31 | char c;
32 |
33 | while (pos >= 0) {
34 | c = doc.getChar(pos);
35 | if (Character.isWhitespace(c) || c == '=' || c == '/'
36 | || c == '"' || c == ':' || c == ',' || c == '['
37 | || c == ']' || c == '\'' || c == '(' || c == ')'
38 | || c == '{' || c == '}' || c == '.' || c == ';'
39 | || c == '-' || c == '+' || c == '*' || c == '%') {
40 | break;
41 | }
42 | --pos;
43 | }
44 |
45 | startPos = pos;
46 |
47 | pos = caretPos;
48 | int length = doc.getLength();
49 |
50 | while (pos < length) {
51 | c = doc.getChar(pos);
52 | if (Character.isWhitespace(c) || c == '=' || c == '/'
53 | || c == '"' || c == ':' || c == ',' || c == '['
54 | || c == ']' || c == '\'' || c == '(' || c == ')'
55 | || c == '{' || c == '}' || c == '.' || c == ';'
56 | || c == '-' || c == '+' || c == '*' || c == '%') {
57 | break;
58 | }
59 | ++pos;
60 | }
61 |
62 | endPos = pos;
63 | selectRange(startPos, endPos);
64 | return true;
65 |
66 | } catch (BadLocationException x) {
67 | }
68 |
69 | return false;
70 | }
71 |
72 | private void selectRange(int startPos, int stopPos) {
73 | int offset = startPos + 1;
74 | int length = stopPos - offset;
75 | fText.setSelectedRange(offset, length);
76 | }
77 | }
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/JavaScriptEditorContributor.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.editors.HTMLSourceEditorContributer;
4 |
5 | public class JavaScriptEditorContributor extends HTMLSourceEditorContributer {
6 |
7 | public JavaScriptEditorContributor(){
8 | addActionId(JavaScriptEditor.ACTION_COMMENT);
9 | addActionId(JavaScriptEditor.ACTION_OUTLINE);
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/JavaScriptFileDocumentProvider.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors;
2 |
3 | import org.eclipse.core.runtime.CoreException;
4 | import org.eclipse.jface.text.IDocument;
5 | import org.eclipse.jface.text.IDocumentPartitioner;
6 | import org.eclipse.jface.text.rules.FastPartitioner;
7 | import org.eclipse.ui.editors.text.FileDocumentProvider;
8 |
9 | /**
10 | *
11 | * @author Naoki Takezoe
12 | */
13 | public class JavaScriptFileDocumentProvider extends FileDocumentProvider {
14 | public IDocument createDocument(Object element) throws CoreException {
15 | IDocument document = super.createDocument(element);
16 | if (document != null) {
17 | IDocumentPartitioner partitioner =
18 | new FastPartitioner(
19 | new JavaScriptPartitionScanner(),
20 | new String[]{
21 | JavaScriptPartitionScanner.JS_COMMENT,
22 | JavaScriptPartitionScanner.JS_JSDOC
23 | });
24 | partitioner.connect(document);
25 | document.setDocumentPartitioner(partitioner);
26 | }
27 | return document;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/JavaScriptFunctionProposal.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors;
2 |
3 | import org.eclipse.jface.text.IRegion;
4 | import org.eclipse.jface.text.contentassist.ICompletionProposalExtension4;
5 | import org.eclipse.jface.text.templates.Template;
6 | import org.eclipse.jface.text.templates.TemplateContext;
7 | import org.eclipse.jface.text.templates.TemplateProposal;
8 | import org.eclipse.swt.graphics.Image;
9 |
10 | public class JavaScriptFunctionProposal extends TemplateProposal implements
11 | ICompletionProposalExtension4 {
12 |
13 | private String additionalInfo;
14 |
15 | public JavaScriptFunctionProposal(Template template, TemplateContext context, IRegion region, Image image,
16 | String additionalInfo) {
17 | super(template, context, region, image);
18 | this.additionalInfo = additionalInfo;
19 | }
20 |
21 | public JavaScriptFunctionProposal(Template template, TemplateContext context, IRegion region, Image image,
22 | String additionalInfo, int relevance) {
23 | super(template, context, region, image, relevance);
24 | this.additionalInfo = additionalInfo;
25 | }
26 |
27 | public String getAdditionalProposalInfo() {
28 | return this.additionalInfo;
29 | }
30 |
31 | public boolean isAutoInsertable() {
32 | return false;
33 | }
34 |
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/JavaScriptTextDocumentProvider.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors;
2 |
3 | import org.eclipse.core.runtime.CoreException;
4 | import org.eclipse.jface.text.IDocument;
5 | import org.eclipse.jface.text.IDocumentPartitioner;
6 | import org.eclipse.jface.text.rules.FastPartitioner;
7 | import org.eclipse.ui.editors.text.TextFileDocumentProvider;
8 |
9 | /**
10 | *
11 | * @author Naoki Takezoe
12 | */
13 | public class JavaScriptTextDocumentProvider extends TextFileDocumentProvider {
14 |
15 | protected FileInfo createFileInfo(Object element) throws CoreException {
16 | FileInfo info = super.createFileInfo(element);
17 | if(info==null){
18 | info = createEmptyFileInfo();
19 | }
20 | IDocument document = info.fTextFileBuffer.getDocument();
21 | if (document != null) {
22 | IDocumentPartitioner partitioner =
23 | new FastPartitioner(
24 | new JavaScriptPartitionScanner(),
25 | new String[]{
26 | JavaScriptPartitionScanner.JS_COMMENT,
27 | JavaScriptPartitionScanner.JS_JSDOC
28 | });
29 | partitioner.connect(document);
30 | document.setDocumentPartitioner(partitioner);
31 | }
32 | return info;
33 | }
34 |
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/additional/AIRCompleter.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors.additional;
2 |
3 | import java.util.List;
4 |
5 | import jp.sf.amateras.jseditor.editors.model.JavaScriptModel;
6 |
7 | /**
8 | * IAdditionalJavaScriptCompleter
implementation for Adobe AIR.
9 | *
10 | * @author Naoki Takezoe
11 | * @author shinsuke
12 | */
13 | public class AIRCompleter extends AbstractCompleter {
14 | public List loadModel(List libModelList) {
15 | // TODO
16 | return null;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/additional/ChromeCompleter.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors.additional;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import jp.sf.amateras.htmleditor.HTMLPlugin;
7 | import jp.sf.amateras.jseditor.editors.model.JavaScriptModel;
8 |
9 | /**
10 | * IAdditionalJavaScriptCompleter
implementation for
11 | * Chrome .
12 | *
13 | * @author shinsuke
14 | */
15 | public class ChromeCompleter extends AbstractCompleter {
16 | public List loadModel(List libModelList) {
17 | try {
18 | JsFileCache jsFileCache = getJsFileCache("js/chrome/chrome-16.js");
19 | String source = new String(jsFileCache.getBytes(), "UTF-8");
20 | JavaScriptModel model = new JavaScriptModel(jsFileCache.getFile(),
21 | source, libModelList);
22 | if (model != null) {
23 | libModelList.add(model);
24 | List list = new ArrayList();
25 | list.add(model);
26 | return list;
27 | }
28 | } catch (Exception e) {
29 | HTMLPlugin.logException(e);
30 | }
31 | return null;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/additional/ECMAScriptCompleter.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors.additional;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import jp.sf.amateras.htmleditor.HTMLPlugin;
7 | import jp.sf.amateras.jseditor.editors.model.JavaScriptModel;
8 |
9 | /**
10 | * IAdditionalJavaScriptCompleter
implementation for ECMA
11 | * Script .
12 | *
13 | * @author shinsuke
14 | */
15 | public class ECMAScriptCompleter extends AbstractCompleter {
16 | public List loadModel(List libModelList) {
17 | try {
18 | JsFileCache jsFileCache = getJsFileCache("js/ecma/ecmascript-5.js");
19 | String source = new String(jsFileCache.getBytes(), "UTF-8");
20 | JavaScriptModel model = new JavaScriptModel(jsFileCache.getFile(),
21 | source, libModelList);
22 | if (model != null) {
23 | libModelList.add(model);
24 | List list = new ArrayList();
25 | list.add(model);
26 | return list;
27 | }
28 | } catch (Exception e) {
29 | HTMLPlugin.logException(e);
30 | }
31 | return null;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/additional/FireFoxCompleter.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors.additional;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import jp.sf.amateras.htmleditor.HTMLPlugin;
7 | import jp.sf.amateras.jseditor.editors.model.JavaScriptModel;
8 |
9 | /**
10 | * IAdditionalJavaScriptCompleter
implementation for
11 | * FireFox .
12 | *
13 | * @author shinsuke
14 | */
15 | public class FireFoxCompleter extends AbstractCompleter {
16 | public List loadModel(List libModelList) {
17 | try {
18 | JsFileCache jsFileCache = getJsFileCache("js/firefox/firefox-9.js");
19 | String source = new String(jsFileCache.getBytes(), "UTF-8");
20 | JavaScriptModel model = new JavaScriptModel(jsFileCache.getFile(),
21 | source, libModelList);
22 | if (model != null) {
23 | libModelList.add(model);
24 | List list = new ArrayList();
25 | list.add(model);
26 | return list;
27 | }
28 | } catch (Exception e) {
29 | HTMLPlugin.logException(e);
30 | }
31 | return null;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/additional/IAdditionalJavaScriptCompleter.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors.additional;
2 |
3 | import java.util.List;
4 |
5 | import jp.sf.amateras.jseditor.editors.model.JavaScriptModel;
6 |
7 | /**
8 | * Provides additional JavaScript completion proposals.
9 | *
10 | * @author Naoki Takezoe
11 | * @author shinsuke
12 | */
13 | public interface IAdditionalJavaScriptCompleter {
14 |
15 | /**
16 | * Load JS file and put the created model to the list.
17 | *
18 | * @param libModelList
19 | */
20 | List loadModel(List libModelList);
21 | }
22 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/additional/JQueryCompleter.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors.additional;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import jp.sf.amateras.htmleditor.HTMLPlugin;
7 | import jp.sf.amateras.jseditor.editors.model.JavaScriptModel;
8 |
9 | /**
10 | * IAdditionalJavaScriptCompleter
implementation for
11 | * jQuery .
12 | *
13 | * @author Naoki Takezoe
14 | * @author shinsuke
15 | */
16 | public class JQueryCompleter extends AbstractCompleter {
17 |
18 | public List loadModel(List libModelList) {
19 | try {
20 | JsFileCache jsFileCache = getJsFileCache("js/jquery/1.7.1/jquery-1.7.1.js");
21 | String source = new String(jsFileCache.getBytes(), "UTF-8");
22 | JavaScriptModel model = new JavaScriptModel(jsFileCache.getFile(),
23 | source, libModelList);
24 | if (model != null) {
25 | libModelList.add(model);
26 | List list = new ArrayList();
27 | list.add(model);
28 | return list;
29 | }
30 | } catch (Exception e) {
31 | HTMLPlugin.logException(e);
32 | }
33 | return null;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/additional/NodeJsCompleter.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors.additional;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import jp.sf.amateras.htmleditor.HTMLPlugin;
7 | import jp.sf.amateras.jseditor.editors.model.JavaScriptModel;
8 |
9 | /**
10 | * IAdditionalJavaScriptCompleter
implementation for
11 | * node.JS .
12 | *
13 | * @author shinsuke
14 | */
15 | public class NodeJsCompleter extends AbstractCompleter {
16 | public List loadModel(List libModelList) {
17 | try {
18 | JsFileCache jsFileCache = getJsFileCache("js/nodejs/0.6.6/node.js");
19 | String source = new String(jsFileCache.getBytes(), "UTF-8");
20 | JavaScriptModel model = new JavaScriptModel(jsFileCache.getFile(),
21 | source, libModelList);
22 | if (model != null) {
23 | libModelList.add(model);
24 | List list = new ArrayList();
25 | list.add(model);
26 | return list;
27 | }
28 | } catch (Exception e) {
29 | HTMLPlugin.logException(e);
30 | }
31 | return null;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/additional/PrototypeCompleter.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors.additional;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import jp.sf.amateras.htmleditor.HTMLPlugin;
7 | import jp.sf.amateras.jseditor.editors.model.JavaScriptModel;
8 |
9 | /**
10 | * IAdditionalJavaScriptCompleter
implementation for
11 | * prototype.js .
12 | *
13 | * @author Naoki Takezoe
14 | */
15 | public class PrototypeCompleter extends AbstractCompleter {
16 |
17 | public List loadModel(List libModelList) {
18 | try {
19 | JsFileCache jsFileCache = getJsFileCache("js/prototype/1.7.0.0/prototype.js");
20 | String source = new String(jsFileCache.getBytes(), "UTF-8");
21 | JavaScriptModel model = new JavaScriptModel(jsFileCache.getFile(),
22 | source, libModelList);
23 | if (model != null) {
24 | libModelList.add(model);
25 | List list = new ArrayList();
26 | list.add(model);
27 | return list;
28 | }
29 | } catch (Exception e) {
30 | HTMLPlugin.logException(e);
31 | }
32 | return null;
33 | }
34 | }
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/additional/ScriptaculousCompleter.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors.additional;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import jp.sf.amateras.htmleditor.HTMLPlugin;
7 | import jp.sf.amateras.jseditor.editors.model.JavaScriptModel;
8 |
9 | public class ScriptaculousCompleter extends AbstractCompleter {
10 | private static final String[] JS_FILES = new String[] { "scriptaculous.js",
11 | "builder.js", "effects.js", "dragdrop.js", "controls.js",
12 | "slider.js", "sound" };
13 | private static final String BASE_JS_DIR = "js/scriptaculous/1.9.0/";
14 |
15 | public List loadModel(List libModelList) {
16 | try {
17 | List list = new ArrayList();
18 | for (String jsFile : JS_FILES) {
19 | JsFileCache jsFileCache = getJsFileCache(BASE_JS_DIR + jsFile);
20 | String source = new String(jsFileCache.getBytes(), "UTF-8");
21 | JavaScriptModel model = new JavaScriptModel(
22 | jsFileCache.getFile(), source, libModelList);
23 | if (model != null) {
24 | libModelList.add(model);
25 | list.add(model);
26 | }
27 | }
28 | return list.isEmpty() ? null : list;
29 | } catch (Exception e) {
30 | HTMLPlugin.logException(e);
31 | }
32 | return null;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/model/JavaScriptAlias.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors.model;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 | import java.util.Set;
6 |
7 | /**
8 | * An alias class for JavaScriptVariable.
9 | *
10 | * @author shinsuke
11 | */
12 | public class JavaScriptAlias extends JavaScriptVariable {
13 | private JavaScriptVariable jsVar;
14 |
15 | public JavaScriptAlias(String name, JavaScriptVariable jsVar) {
16 | super(name, new ArrayList());
17 | this.name = name;
18 | this.jsVar = jsVar;
19 | }
20 |
21 | public JavaScriptFunction getFunction() {
22 | return jsVar.getFunction();
23 | }
24 |
25 | public void setFunction(JavaScriptFunction function) {
26 | jsVar.setFunction(function);
27 | }
28 |
29 | public JavaScriptContext getContext() {
30 | return jsVar.getContext();
31 | }
32 |
33 | public String[] getTypes() {
34 | return jsVar.getTypes();
35 | }
36 |
37 | public String[] getReturnTypes() {
38 | return jsVar.getReturnTypes();
39 | }
40 |
41 | public void addTypes(String[] types) {
42 | jsVar.addTypes(types);
43 | }
44 |
45 | public boolean hasReturnType(Set returnTypeSet) {
46 | return jsVar.hasReturnType(returnTypeSet);
47 | }
48 |
49 | public boolean hasType(Set typeSet) {
50 | return jsVar.hasType(typeSet);
51 | }
52 |
53 | public JavaScriptPrototype createPrototype() {
54 | return jsVar.createPrototype();
55 | }
56 |
57 | public void setContext(JavaScriptContext block) {
58 | jsVar.setContext(block);
59 | }
60 |
61 | protected List getTypeList() {
62 | return jsVar.getTypeList();
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/editors/model/JavaScriptComment.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.editors.model;
2 |
3 | /**
4 | * The model for the JavaScript comment.
5 | *
6 | * @author Naoki Takezoe
7 | * @author shinsuke
8 | */
9 | public class JavaScriptComment {
10 | private int start;
11 | private int end;
12 | private String text;
13 |
14 | public JavaScriptComment(int start, int end, String text) {
15 | this.start = start;
16 | this.end = end;
17 | this.text = text;
18 | }
19 |
20 | public int getStart() {
21 | return start;
22 | }
23 |
24 | public int getEnd() {
25 | return end;
26 | }
27 |
28 | public String getText() {
29 | return text;
30 | }
31 |
32 | public String toString() {
33 | return getText();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/launch/JavaScriptLaunchConstants.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.launch;
2 |
3 | import jp.sf.amateras.jseditor.launch.executer.JavaScriptExecutor;
4 |
5 | /**
6 | * Defines constants for the JavaScript launcher.
7 | *
8 | * @author Naoki Takezoe
9 | */
10 | public class JavaScriptLaunchConstants {
11 |
12 | /** The executor class name. */
13 | public static final String JAVASCRIPT_EXECUTOR = JavaScriptExecutor.class.getName();
14 |
15 | public static final String ATTR_JAVASCRIPT_FILE = "javascript.file";
16 | public static final String ATTR_JAVASCRIPT_INCLUDES = "javascript.includes";
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/launch/JavaScriptTabGroup.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.launch;
2 |
3 | import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
4 | import org.eclipse.debug.ui.CommonTab;
5 | import org.eclipse.debug.ui.ILaunchConfigurationDialog;
6 | import org.eclipse.debug.ui.ILaunchConfigurationTab;
7 |
8 | /**
9 | *
10 | * @author Naoki Takezoe
11 | */
12 | public class JavaScriptTabGroup extends AbstractLaunchConfigurationTabGroup {
13 |
14 | public JavaScriptTabGroup() {
15 | super();
16 | }
17 |
18 | public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
19 |
20 | ILaunchConfigurationTab[] tabs = {
21 | new JavaScriptMainTab(),
22 | new CommonTab()
23 | };
24 |
25 | setTabs(tabs);
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jseditor/launch/executer/JavaScriptExecutor.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jseditor.launch.executer;
2 | import java.io.File;
3 | import java.io.FileReader;
4 |
5 | import org.mozilla.javascript.Context;
6 | import org.mozilla.javascript.Scriptable;
7 |
8 | /**
9 | *
10 | * @author Naoki Takezoe
11 | */
12 | public class JavaScriptExecutor {
13 |
14 | public static void main(String[] args) throws Exception {
15 | File file = new File(args[0]);
16 |
17 | Context cx = Context.enter();
18 | Scriptable scope = cx.initStandardObjects();
19 |
20 | // InputStream in = JavaScriptExecutor.class.getResourceAsStream("common.js");
21 | // cx.evaluateReader(scope, new InputStreamReader(in), "common.js", 1, null);
22 |
23 | try {
24 | if(args.length > 1){
25 | for(int i=1; i libs = new HashMap();
18 | static {
19 | libs.put("prototype.js 1.6.0", new JSLibrary(
20 | "js/prototype/1.6.0/prototype-1.6.0.2.js"));
21 |
22 | libs.put("script.aculo.us 1.8.1", new JSLibrary(
23 | "js/scriptaculous/1.8.1/builder.js",
24 | "js/scriptaculous/1.8.1/controls.js",
25 | "js/scriptaculous/1.8.1/dragdrop.js",
26 | "js/scriptaculous/1.8.1/effects.js",
27 | "js/scriptaculous/1.8.1/scriptaculous.js",
28 | "js/scriptaculous/1.8.1/slider.js",
29 | "js/scriptaculous/1.8.1/sound.js",
30 | "js/scriptaculous/1.8.1/unittest.js"));
31 | }
32 |
33 | public static String[] getLibraryNames(){
34 | return libs.keySet().toArray(new String[libs.size()]);
35 | }
36 |
37 | public static void copyLibrary(String name, IContainer container){
38 | JSLibrary lib = libs.get(name);
39 | if(lib != null){
40 | lib.copy(container);
41 | }
42 | }
43 |
44 | private static class JSLibrary {
45 | private String[] files;
46 |
47 | public JSLibrary(String... files){
48 | this.files = files;
49 | }
50 |
51 | public void copy(IContainer container){
52 | for(String filePath: files){
53 | try {
54 | URL url = HTMLPlugin.getDefault().getBundle().getEntry(filePath);
55 | byte[] buf = IOUtil.readStream(url.openStream());
56 |
57 | int index = filePath.lastIndexOf('/');
58 | if(index >= 0){
59 | filePath = filePath.substring(index + 1);
60 | }
61 |
62 | IFile file = container.getFile(new Path(filePath));
63 | file.create(new ByteArrayInputStream(buf), true, null);
64 | } catch(Exception ex){
65 | HTMLPlugin.logException(ex);
66 | }
67 | }
68 | }
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/compiler/CompileResult.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.compiler;
2 |
3 | /**
4 | *
5 | *
6 | * @author Naoki Takezoe
7 | * @since 2.0.3
8 | * @see JSPCompiler
9 | */
10 | public class CompileResult {
11 |
12 | private String header;
13 | private String body;
14 | private String footer;
15 |
16 | public CompileResult(String header, String body, String footer){
17 | this.header = header;
18 | this.body = body;
19 | this.footer = footer;
20 | }
21 |
22 | public String getHeader(){
23 | return this.header;
24 | }
25 |
26 | public String getBody(){
27 | return this.body;
28 | }
29 |
30 | public String getFooter(){
31 | return this.footer;
32 | }
33 |
34 | @Override public String toString(){
35 | return header + body + footer;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/converters/AbstractCustomTagConverter.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.converters;
2 |
3 | import java.util.Iterator;
4 | import java.util.Map;
5 |
6 | import jp.aonir.fuzzyxml.FuzzyXMLElement;
7 | import jp.aonir.fuzzyxml.FuzzyXMLNode;
8 | import jp.sf.amateras.htmleditor.ICustomTagConverter;
9 | import jp.sf.amateras.jspeditor.editors.JSPInfo;
10 | import jp.sf.amateras.jspeditor.editors.JSPPreviewConverter;
11 |
12 | public abstract class AbstractCustomTagConverter implements ICustomTagConverter {
13 |
14 | protected String evalBody(FuzzyXMLNode child,JSPInfo info, boolean fixPath){
15 | return evalBody(new FuzzyXMLNode[]{child}, info, fixPath);
16 | }
17 |
18 | protected String evalBody(FuzzyXMLNode[] children, JSPInfo info, boolean fixPath){
19 | if(children==null){
20 | return "";
21 | }
22 | StringBuffer sb = new StringBuffer();
23 | for(int i=0;i attrs){
37 | StringBuffer sb = new StringBuffer();
38 | Iterator ite = attrs.keySet().iterator();
39 | while(ite.hasNext()){
40 | String key = ite.next();
41 | if(key.equals("styleClass")){
42 | sb.append(" class=\"" + attrs.get(key) + "\"");
43 | } else {
44 | sb.append(" " + key + "=\"" + attrs.get(key) + "\"");
45 | }
46 | }
47 | return sb.toString();
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/converters/HTMLConverter.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.converters;
2 |
3 | import java.util.Iterator;
4 | import java.util.Map;
5 |
6 | import jp.aonir.fuzzyxml.FuzzyXMLNode;
7 | import jp.sf.amateras.jspeditor.editors.JSPInfo;
8 |
9 | public class HTMLConverter extends AbstractCustomTagConverter {
10 |
11 | private String tagName = null;
12 |
13 | public HTMLConverter(String tagName){
14 | this.tagName = tagName;
15 | }
16 |
17 | protected String convertStartTag(Map attributes) {
18 | return "<" + createTag(tagName,attributes) + ">";
19 | }
20 |
21 | protected String convertEndTag() {
22 | if(tagName.indexOf(" ")!=-1){
23 | return "" + tagName.substring(0,tagName.indexOf(" ")) + ">";
24 | } else {
25 | return "" + tagName + ">";
26 | }
27 | }
28 |
29 | protected String createTag(String tagName,Map attributes){
30 | StringBuffer sb = new StringBuffer();
31 | sb.append(tagName);
32 |
33 | Iterator ite = attributes.keySet().iterator();
34 | while(ite.hasNext()){
35 | String key = ite.next();
36 | sb.append(" " + key + "=\"" + attributes.get(key) + "\"");
37 | }
38 |
39 | return sb.toString();
40 | }
41 |
42 | public String process(Map attrs,
43 | FuzzyXMLNode[] children, JSPInfo info, boolean fixPath) {
44 | StringBuffer sb = new StringBuffer();
45 | sb.append(convertStartTag(attrs));
46 | sb.append(evalBody(children, info, fixPath));
47 | sb.append(convertEndTag());
48 | return sb.toString();
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/converters/NullConverter.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.converters;
2 |
3 | import java.util.Map;
4 |
5 | import jp.aonir.fuzzyxml.FuzzyXMLNode;
6 | import jp.sf.amateras.jspeditor.editors.JSPInfo;
7 |
8 | public class NullConverter extends AbstractCustomTagConverter {
9 |
10 | public String process(Map attrs,
11 | FuzzyXMLNode[] children, JSPInfo info, boolean fixPath) {
12 |
13 | return evalBody(children, info, fixPath);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/editors/Function.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.editors;
2 |
3 | /**
4 | *
5 | * @author Naoki Takezoe
6 | * @since 2.0.6
7 | */
8 | public class Function {
9 |
10 | private String name;
11 | // private String signature;
12 | private String description;
13 |
14 | public String getName() {
15 | return name;
16 | }
17 |
18 | public void setName(String name) {
19 | this.name = name;
20 | }
21 |
22 | // public String getSignature() {
23 | // return signature;
24 | // }
25 | //
26 | // public void setSignature(String signature) {
27 | // this.signature = signature;
28 | // }
29 |
30 | public String getDescription() {
31 | return description;
32 | }
33 |
34 | public void setDescription(String description) {
35 | this.description = description;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/editors/IJSPELAssistProcessor.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.editors;
2 |
3 | import jp.aonir.fuzzyxml.FuzzyXMLElement;
4 | import jp.sf.amateras.htmleditor.assist.AssistInfo;
5 |
6 | /**
7 | *
8 | * @author Naoki Takezoe
9 | * @since 2.0.6
10 | */
11 | public interface IJSPELAssistProcessor {
12 |
13 | public AssistInfo[] getCompletionProposals(
14 | FuzzyXMLElement element, String expression);
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/editors/IJSPFilter.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.editors;
2 |
3 | import org.eclipse.core.resources.IFile;
4 |
5 | /**
6 | * The interface for the JSP filter.
7 | *
8 | * This filter is called by the JSPValidator
before validation processing.
9 | *
10 | * @author Tom Wickham-Jones
11 | * @since 2.0.5
12 | */
13 | public interface IJSPFilter {
14 |
15 | /**
16 | * Return the possibly modified contents of a JSP.
17 | *
18 | * @param raw contents
19 | * @param the target JSP file
20 | * @return filtered contents
21 | */
22 | public String filterJSP( String contents, IFile file);
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/editors/IJSPValidationMarkerCreator.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.editors;
2 |
3 | public interface IJSPValidationMarkerCreator {
4 |
5 | public void addMarker( int severity, int offset, int length, String message);
6 | }
7 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/editors/ITLDLocator.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.editors;
2 |
3 | import java.io.InputStream;
4 |
5 | public interface ITLDLocator {
6 |
7 | /*
8 | * Return the InputStream for a given TLD uri.
9 | */
10 | public InputStream locateTLD( String uri);
11 |
12 | /*
13 | * Return the URI
14 | */
15 | public String getURI();
16 |
17 | /*
18 | * Return a name
19 | */
20 | public String getPath();
21 | }
22 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/editors/JSPAutoEditStrategy.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.HTMLPlugin;
4 | import jp.sf.amateras.htmleditor.editors.HTMLAutoEditStrategy;
5 |
6 | import org.eclipse.jface.text.BadLocationException;
7 | import org.eclipse.jface.text.DocumentCommand;
8 | import org.eclipse.jface.text.IDocument;
9 |
10 | /**
11 | * Provides auto inserting for JSPs.
12 | *
13 | *
14 | * ${ would be ${}
15 | * <%-- would be <%-- --%>
16 | * <% would be <% %>
17 | *
18 | *
19 | * @author Naoki Takezoe
20 | * @since 2.0.3
21 | */
22 | public class JSPAutoEditStrategy extends HTMLAutoEditStrategy {
23 |
24 | @Override public void customizeDocumentCommand(IDocument d, DocumentCommand c) {
25 | if(enable){
26 | try {
27 | if("{".equals(c.text) && c.offset > 0){
28 | if(d.getChar(c.offset - 1) == '$'){
29 | c.text = "{}";
30 | c.shiftsCaret = false;
31 | c.caretOffset = c.offset + 1;
32 | c.doit = false;
33 | return;
34 | }
35 | }
36 | if("-".equals(c.text) && c.offset >= 3 && d.get(c.offset - 3, 3).equals("<%-")){
37 | c.text = "- --%>";
38 | c.shiftsCaret = false;
39 | c.caretOffset = c.offset + 2;
40 | c.doit = false;
41 | return;
42 | }
43 | } catch (BadLocationException e) {
44 | HTMLPlugin.logException(e);
45 | }
46 | }
47 | super.customizeDocumentCommand(d, c);
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/editors/JSPDirectiveScanner.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.editors;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import jp.sf.amateras.htmleditor.ColorProvider;
7 | import jp.sf.amateras.htmleditor.HTMLPlugin;
8 | import jp.sf.amateras.htmleditor.editors.HTMLWhitespaceDetector;
9 |
10 | import org.eclipse.jface.text.rules.IRule;
11 | import org.eclipse.jface.text.rules.IToken;
12 | import org.eclipse.jface.text.rules.IWordDetector;
13 | import org.eclipse.jface.text.rules.RuleBasedScanner;
14 | import org.eclipse.jface.text.rules.SingleLineRule;
15 | import org.eclipse.jface.text.rules.WhitespaceRule;
16 | import org.eclipse.jface.text.rules.WordRule;
17 |
18 | /**
19 | * @author Naoki Takezoe
20 | */
21 | public class JSPDirectiveScanner extends RuleBasedScanner {
22 |
23 | public JSPDirectiveScanner(ColorProvider provider){
24 | IToken string = provider.getToken(HTMLPlugin.PREF_COLOR_STRING);
25 | IToken script = provider.getToken(HTMLPlugin.PREF_COLOR_SCRIPT);
26 | List rules = new ArrayList();
27 |
28 | rules.add(new SingleLineRule("\"", "\"", string, '\\'));
29 | rules.add(new SingleLineRule("\'", "\'", string, '\\'));
30 | rules.add(new WhitespaceRule(new HTMLWhitespaceDetector()));
31 |
32 | WordRule delimitor = new WordRule(new IWordDetector(){
33 | public boolean isWordStart(char c){
34 | if(c=='<' || c=='%' || c=='@'){
35 | return true;
36 | }
37 | return false;
38 | }
39 | public boolean isWordPart(char c){
40 | if(c=='<' || c=='%' || c=='=' || c=='>' || c=='@'){
41 | return true;
42 | }
43 | return false;
44 | }
45 | });
46 | delimitor.addWord("<%@", script);
47 | delimitor.addWord("%>", script);
48 | rules.add(delimitor);
49 |
50 |
51 | setRules(rules.toArray(new IRule[rules.size()]));
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/editors/JSPEditorContributor.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.editors.HTMLEditorContributor;
4 |
5 | public class JSPEditorContributor extends HTMLEditorContributor {
6 |
7 | @Override protected void init(){
8 | super.init();
9 | contributer.addActionId(JSPSourceEditor.ACTION_JSP_COMMENT);
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/editors/JSPHyperlinkProvider.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.editors;
2 |
3 | import jp.aonir.fuzzyxml.FuzzyXMLDocument;
4 | import jp.aonir.fuzzyxml.FuzzyXMLElement;
5 | import jp.sf.amateras.htmleditor.IHyperlinkProvider;
6 | import jp.sf.amateras.htmleditor.editors.HTMLHyperlinkInfo;
7 |
8 | import org.eclipse.core.resources.IFile;
9 | import org.eclipse.core.resources.IResource;
10 | import org.eclipse.core.runtime.IPath;
11 |
12 | public class JSPHyperlinkProvider implements IHyperlinkProvider {
13 |
14 | public HTMLHyperlinkInfo getHyperlinkInfo(IFile file, FuzzyXMLDocument doc,
15 | FuzzyXMLElement element, String attrName, String attrValue,int offset) {
16 |
17 | if(element.getName().equals("jsp:include") && attrName.equals("page")){
18 | IPath path = file.getParent().getProjectRelativePath();
19 | IResource resource = file.getProject().findMember(path.append(attrValue));
20 | if(resource!=null && resource.exists() && resource instanceof IFile){
21 | HTMLHyperlinkInfo info = new HTMLHyperlinkInfo();
22 | info.setObject(resource);
23 | info.setOffset(0);
24 | info.setLength(attrValue.length());
25 | return info;
26 | }
27 | }
28 |
29 | return null;
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/editors/JSPTagInfo.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.assist.TagInfo;
4 |
5 | /**
6 | *
7 | * @author Naoki Takezoe
8 | * @since 2.0.6
9 | */
10 | public class JSPTagInfo extends TagInfo {
11 |
12 | private boolean dynamicAttributes;
13 |
14 | public JSPTagInfo(String tagName, boolean hasBody) {
15 | super(tagName, hasBody);
16 | }
17 |
18 | public JSPTagInfo(String tagName, boolean hasBody, boolean emptyTag) {
19 | super(tagName, hasBody, emptyTag);
20 | }
21 |
22 | public boolean isDynamicAttributes() {
23 | return dynamicAttributes;
24 | }
25 |
26 | public void setDynamicAttributes(boolean dynamicAttributes) {
27 | this.dynamicAttributes = dynamicAttributes;
28 | }
29 |
30 | @Override public String getDisplayString() {
31 | if(dynamicAttributes){
32 | return super.getDisplayString() + " (dynamic-attributes)";
33 | }
34 | return super.getDisplayString();
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/editors/TLDResolver.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.editors;
2 |
3 | import java.io.IOException;
4 | import java.io.InputStream;
5 |
6 | import org.xml.sax.EntityResolver;
7 | import org.xml.sax.InputSource;
8 | import org.xml.sax.SAXException;
9 |
10 | public class TLDResolver implements EntityResolver {
11 |
12 | public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
13 | if(systemId!=null && systemId.equals("http://java.sun.com/dtd/web-jsptaglibrary_1_1.dtd")){
14 | InputStream in = getClass().getResourceAsStream("/DTD/web-jsptaglibrary_1_1.dtd");
15 | return new InputSource(in);
16 | }
17 | if(systemId!=null && systemId.equals("http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd")){
18 | InputStream in = getClass().getResourceAsStream("/DTD/web-jsptaglibrary_1_1.dtd");
19 | return new InputSource(in);
20 | }
21 | if(systemId!=null && systemId.equals("http://java.sun.com/j2ee/dtd/web-jsptaglibrary_1_2.dtd")){
22 | InputStream in = getClass().getResourceAsStream("/DTD/web-jsptaglibrary_1_2.dtd");
23 | return new InputSource(in);
24 | }
25 | if(systemId!=null && systemId.equals("http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd")){
26 | InputStream in = getClass().getResourceAsStream("/DTD/web-jsptaglibrary_1_2.dtd");
27 | return new InputSource(in);
28 | }
29 | return null;
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/jspeditor/editors/TagFileParser.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.jspeditor.editors;
2 |
3 | import java.io.File;
4 | import java.io.FileInputStream;
5 | import java.io.InputStream;
6 | import java.util.regex.Matcher;
7 | import java.util.regex.Pattern;
8 |
9 | import jp.sf.amateras.htmleditor.IOUtil;
10 | import jp.sf.amateras.htmleditor.assist.AttributeInfo;
11 | import jp.sf.amateras.htmleditor.assist.TagInfo;
12 |
13 | /**
14 | * @author Naoki Takezoe
15 | */
16 | public class TagFileParser {
17 |
18 | private static final Pattern ATTRIBUTE = Pattern.compile("<%@\\s*attribute\\s+(.+?)%>",Pattern.DOTALL);
19 | private static final Pattern NAME = Pattern.compile("name\\s*=\\s*\"(.+?)\"");
20 | private static final Pattern REQUIRED = Pattern.compile("required\\s*=\\s*\"(.+?)\"");
21 |
22 | public static TagInfo parseTagFile(String prefix, String tagName, InputStream in) throws Exception {
23 |
24 | TagInfo tag = new TagInfo(prefix + ":" + tagName, true);
25 |
26 | byte[] buf = IOUtil.readStream(in);
27 | Matcher matcher = ATTRIBUTE.matcher(new String(buf));
28 | while (matcher.find()) {
29 | String content = matcher.group(1);
30 | String name = getAttribute(content, NAME);
31 | boolean required = getBooleanValue(getAttribute(content, REQUIRED));
32 |
33 | tag.addAttributeInfo(new AttributeInfo(name, true, AttributeInfo.NONE, required));
34 | }
35 |
36 | return tag;
37 | }
38 |
39 | // TODO Is this method required...?
40 | public static TagInfo parseTagFile(String prefix, File file) throws Exception {
41 | String fileName = file.getName();
42 | return parseTagFile(prefix,
43 | fileName.substring(0, fileName.lastIndexOf('.')), new FileInputStream(file));
44 | }
45 |
46 | private static boolean getBooleanValue(String value){
47 | if(value.equals("true")){
48 | return true;
49 | }
50 | return false;
51 | }
52 |
53 | private static String getAttribute(String source,Pattern pattern){
54 | Matcher matcher = pattern.matcher(source);
55 | if(matcher.find()){
56 | return matcher.group(1);
57 | }
58 | return null;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/xmleditor/editors/ClassNameHyperLinkProvider.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.xmleditor.editors;
2 |
3 | import jp.aonir.fuzzyxml.FuzzyXMLDocument;
4 | import jp.aonir.fuzzyxml.FuzzyXMLElement;
5 | import jp.sf.amateras.htmleditor.IHyperlinkProvider;
6 | import jp.sf.amateras.htmleditor.editors.HTMLHyperlinkInfo;
7 |
8 | import org.eclipse.core.resources.IFile;
9 | import org.eclipse.core.resources.IProject;
10 | import org.eclipse.jdt.core.IJavaProject;
11 | import org.eclipse.jdt.core.IType;
12 | import org.eclipse.jdt.core.JavaCore;
13 |
14 | /**
15 | * This provides hyperlink for the Java classname.
16 | *
17 | * This provider can work for files which are in the java project.
18 | *
19 | * @author Naoki Takezoe
20 | * @since 2.0.3
21 | */
22 | public class ClassNameHyperLinkProvider implements IHyperlinkProvider {
23 |
24 | private XMLEditor editor;
25 |
26 | /**
27 | * @param editor the target XMLEditor
28 | */
29 | public void setEditor(XMLEditor editor){
30 | this.editor = editor;
31 | }
32 |
33 | public HTMLHyperlinkInfo getHyperlinkInfo(IFile file, FuzzyXMLDocument doc,
34 | FuzzyXMLElement element, String attrName, String attrValue,
35 | int offset) {
36 |
37 | if(file==null || editor==null){
38 | return null;
39 | }
40 |
41 | IProject project = file.getProject();
42 | IJavaProject javaProject = JavaCore.create(project);
43 | if(javaProject==null){
44 | return null;
45 | }
46 |
47 | String[] attrNames = this.editor.getClassNameAttributes();
48 |
49 | for(int i=0;iInputStream of the DTD.
14 | *
15 | * If this resolver has no DTD correponded the given URI,
16 | * this method would return null
.
17 | *
18 | * @param uri URI of DTD
19 | * @return the InputStream
of the DTD or null
20 | */
21 | public InputStream getInputStream(String uri);
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/xmleditor/editors/XMLConfiguration.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.xmleditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.ColorProvider;
4 | import jp.sf.amateras.htmleditor.HTMLHyperlinkDetector;
5 | import jp.sf.amateras.htmleditor.assist.HTMLAssistProcessor;
6 | import jp.sf.amateras.htmleditor.editors.HTMLConfiguration;
7 |
8 | /**
9 | * The editor configuration for the XMLEditor
.
10 | *
11 | * @author Naoki Takezoe
12 | * @see jp.sf.amateras.xmleditor.editors.XMLAssistProcessor
13 | */
14 | public class XMLConfiguration extends HTMLConfiguration {
15 |
16 | private ClassNameHyperLinkProvider classNameHyperlinkProvider = null;
17 |
18 | public XMLConfiguration(ColorProvider colorProvider) {
19 | super(colorProvider);
20 | }
21 |
22 | /**
23 | * Returns the XMLAssistProcessor
as the assist processor.
24 | *
25 | * @return the XMLAssistProcessor
26 | */
27 | protected HTMLAssistProcessor createAssistProcessor() {
28 | return new XMLAssistProcessor();
29 | }
30 |
31 | public ClassNameHyperLinkProvider getClassNameHyperlinkProvider(){
32 | return this.classNameHyperlinkProvider;
33 | }
34 |
35 | /**
36 | * Returns the HTMLHyperlinkDetector
which has
37 | * ClassNameHyperLinkProvider
.
38 | *
39 | * Provides the classname hyperlink for the following attributes.
40 | *
41 | * type
42 | * class
43 | * classname
44 | * bean
45 | * component
46 | *
47 | */
48 | @Override protected HTMLHyperlinkDetector createHyperlinkDetector() {
49 | if(this.classNameHyperlinkProvider == null){
50 | this.classNameHyperlinkProvider = new ClassNameHyperLinkProvider();
51 | }
52 | HTMLHyperlinkDetector detector = super.createHyperlinkDetector();
53 | detector.addHyperlinkProvider(this.classNameHyperlinkProvider);
54 | return detector;
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/xmleditor/editors/XMLEditorContributor.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.xmleditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.editors.HTMLSourceEditorContributer;
4 |
5 | /**
6 | * The editor contributor for the XMLEditor
.
7 | *
8 | * @author Naoki Takezoe
9 | */
10 | public class XMLEditorContributor extends HTMLSourceEditorContributer {
11 |
12 | public XMLEditorContributor(){
13 | addActionId(XMLEditor.ACTION_ESCAPE_XML);
14 | addActionId(XMLEditor.ACTION_COMMENT);
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/xmleditor/editors/XMLOutlinePage.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.xmleditor.editors;
2 |
3 | import jp.aonir.fuzzyxml.FuzzyXMLElement;
4 | import jp.aonir.fuzzyxml.FuzzyXMLNode;
5 | import jp.sf.amateras.htmleditor.HTMLPlugin;
6 | import jp.sf.amateras.htmleditor.editors.HTMLOutlinePage;
7 |
8 | import org.eclipse.swt.graphics.Image;
9 |
10 | /**
11 | * The content outline page implementation for the XMLEditor
.
12 | *
13 | * @author Naoki Takezoe
14 | */
15 | public class XMLOutlinePage extends HTMLOutlinePage {
16 |
17 | public XMLOutlinePage(XMLEditor editor) {
18 | super(editor);
19 | }
20 |
21 | @Override protected Image getNodeImage(FuzzyXMLNode element){
22 | if(element instanceof FuzzyXMLElement){
23 | return HTMLPlugin.getDefault().getImageRegistry().get(HTMLPlugin.ICON_TAG);
24 | }
25 | return super.getNodeImage(element);
26 | }
27 |
28 | @Override protected boolean isHTML(){
29 | return false;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/src/jp/sf/amateras/xmleditor/editors/XMLValidationHandler.java:
--------------------------------------------------------------------------------
1 | package jp.sf.amateras.xmleditor.editors;
2 |
3 | import jp.sf.amateras.htmleditor.HTMLUtil;
4 |
5 | import org.eclipse.core.resources.IMarker;
6 | import org.eclipse.core.resources.IResource;
7 | import org.xml.sax.ErrorHandler;
8 | import org.xml.sax.SAXException;
9 | import org.xml.sax.SAXParseException;
10 |
11 | /**
12 | * An implementation of SAX error handler to validate the XML document.
13 | * When error method is called, this handler creates a marker as an error.
14 | *
15 | * @author takezoe
16 | */
17 | public class XMLValidationHandler implements ErrorHandler {
18 |
19 | private IResource resource;
20 |
21 | public XMLValidationHandler(IResource resource) {
22 | this.resource = resource;
23 | }
24 |
25 | private void addMarker(int line,String message,int type){
26 | if(message.startsWith("src-") || message.startsWith("sch-")){
27 | return;
28 | }
29 | HTMLUtil.addMarker(resource, type, line, message);
30 | }
31 |
32 | public void error(SAXParseException exception) throws SAXException {
33 | int line = exception.getLineNumber();
34 | String message = exception.getMessage();
35 | addMarker(line,message,IMarker.SEVERITY_ERROR);
36 | }
37 |
38 | public void fatalError(SAXParseException exception) throws SAXException {
39 | int line = exception.getLineNumber();
40 | String message = exception.getMessage();
41 | addMarker(line,message,IMarker.SEVERITY_ERROR);
42 | }
43 |
44 | public void warning(SAXParseException exception) throws SAXException {
45 | int line = exception.getLineNumber();
46 | String message = exception.getMessage();
47 | addMarker(line,message,IMarker.SEVERITY_WARNING);
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/jp.sf.amateras.htmleditor/toc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------