├── .gitignore ├── .mvn └── extensions.xml ├── LICENSE ├── README.md ├── ant.macros.xml ├── ant.properties ├── build.xml ├── eclipse.sdk ├── 3.2 │ └── sdk │ │ ├── com.ibm.icu_3.4.5.jar │ │ ├── org.eclipse.core.commands_3.2.0.jar │ │ ├── org.eclipse.core.contenttype_3.2.0.jar │ │ ├── org.eclipse.core.expressions_3.2.1.jar │ │ ├── org.eclipse.core.filebuffers_3.2.0.jar │ │ ├── org.eclipse.core.jobs_3.2.0.jar │ │ ├── org.eclipse.core.resources_3.2.0.jar │ │ ├── org.eclipse.core.runtime.compatibility.auth_3.2.0.jar │ │ ├── org.eclipse.core.runtime_3.2.0.jar │ │ ├── org.eclipse.equinox.common_3.2.0.jar │ │ ├── org.eclipse.equinox.preferences_3.2.1.jar │ │ ├── org.eclipse.equinox.registry_3.2.1.jar │ │ ├── org.eclipse.help_3.2.1.jar │ │ ├── org.eclipse.jface.databinding_1.0.0.jar │ │ ├── org.eclipse.jface.text_3.2.0.jar │ │ ├── org.eclipse.jface_3.2.1.jar │ │ ├── org.eclipse.osgi_3.2.1.jar │ │ ├── org.eclipse.rcp_3.2.0.jar │ │ ├── org.eclipse.swt.win32.win32.x86_3.2.1.jar │ │ ├── org.eclipse.swt_3.2.1.jar │ │ ├── org.eclipse.text_3.2.0.jar │ │ ├── org.eclipse.ui.editors_3.2.0.jar │ │ ├── org.eclipse.ui.ide_3.2.0.jar │ │ ├── org.eclipse.ui.workbench.texteditor_3.2.0.jar │ │ ├── org.eclipse.ui.workbench_3.2.1.jar │ │ ├── org.eclipse.ui_3.2.1.jar │ │ └── org.eclipse.update.configurator_3.2.1.jar └── 3.3 │ ├── com.ibm.icu_3.4.5.jar │ ├── commons-codec-1.3.jar │ ├── commons-httpclient-3.1.jar │ ├── commons-lang-2.3.jar │ ├── commons-logging.jar │ ├── org.eclipse.core.commands_3.3.0.I20070605-0010.jar │ ├── org.eclipse.core.contenttype_3.2.0.jar │ ├── org.eclipse.core.expressions_3.2.1.jar │ ├── org.eclipse.core.filebuffers_3.2.0.jar │ ├── org.eclipse.core.jobs_3.3.0.v20070423.jar │ ├── org.eclipse.core.resources_3.3.0.v20070604.jar │ ├── org.eclipse.core.runtime.compatibility.auth_3.2.0.jar │ ├── org.eclipse.core.runtime_3.3.100.v20070530.jar │ ├── org.eclipse.equinox.common_3.3.0.v20070426.jar │ ├── org.eclipse.equinox.preferences_3.2.100.v20070522.jar │ ├── org.eclipse.equinox.registry_3.3.0.v20070522.jar │ ├── org.eclipse.help_3.2.1.jar │ ├── org.eclipse.jface.databinding_1.0.0.jar │ ├── org.eclipse.jface.text_3.3.0.v20070606-0010.jar │ ├── org.eclipse.jface_3.3.0.I20070606-0010.jar │ ├── org.eclipse.osgi_3.3.0.v20070530.jar │ ├── org.eclipse.rcp_3.2.0.jar │ ├── org.eclipse.swt.win32.win32.x86_3.3.0.v3346.jar │ ├── org.eclipse.swt_3.3.0.v3346.jar │ ├── org.eclipse.text_3.3.0.v20070606-0010.jar │ ├── org.eclipse.ui.editors_3.2.0.jar │ ├── org.eclipse.ui.ide_3.3.0.I20070620.jar │ ├── org.eclipse.ui.workbench.texteditor_3.3.0.v20070606-0010.jar │ ├── org.eclipse.ui.workbench_3.3.0.I20070608-1100.jar │ ├── org.eclipse.ui_3.3.0.I20070614-0800.jar │ └── org.eclipse.update.configurator_3.2.1.jar ├── http4e-Core ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.jdt.ui.prefs │ └── org.eclipse.ltk.core.refactoring.prefs ├── META-INF │ └── MANIFEST.MF ├── about.html ├── ant.project.xml ├── build.properties ├── icons │ ├── assist-header.png │ ├── assist-param.png │ ├── assist-template.png │ ├── blank16.gif │ ├── browser.png │ ├── delete.png │ ├── file-open-dis.png │ ├── file-open.png │ ├── go.gif │ ├── hex.gif │ ├── hex.png │ ├── json.png │ ├── loading-small.gif │ ├── loading-small.png │ ├── logo.png │ ├── logok.png │ ├── pretty.png │ ├── progress_stop_off.gif │ ├── progress_stop_on.gif │ ├── raw.png │ ├── title-line.png │ └── view-fullscreen.png ├── lib │ ├── commons-codec-1.3.jar │ ├── commons-httpclient-3.1-beta1-m.jar │ ├── commons-lang-2.3.jar │ ├── commons-logging.jar │ ├── velocity-1.6.3-dep.jar │ ├── velocity-1.6.3.jar │ └── xom-1.2.4.jar ├── resources │ ├── Info-Accept-Charset.properties │ ├── Info-Accept-Language.properties │ ├── Info-Content-Language.properties │ ├── Info-Content-MD5.properties │ ├── Info-Content-Type.properties │ ├── Info-Headers.properties │ ├── Info-Properties.rar │ ├── cocoa-delete.vm │ ├── cocoa-get.vm │ ├── cocoa-post.vm │ ├── cocoa-put.vm │ ├── csharp.vm │ ├── flex.vm │ ├── headers-values.properties │ ├── headers.properties │ ├── http-runner-src.txt │ ├── http4e-item.vm │ ├── http4e-sessions.vm │ ├── java.vm │ ├── java3.vm │ ├── jmx.vm │ ├── js-jquery.vm │ ├── js-prototype.vm │ ├── js-xhr.vm │ ├── oc.vm │ ├── php.vm │ ├── python.vm │ ├── ruby.vm │ └── vb.vm └── src │ └── app │ ├── com │ └── gargoylesoftware │ │ └── htmlunit │ │ └── ssl │ │ ├── InsecureSSLProtocolSocketFactory.java │ │ └── InsecureTrustManager.java │ └── org │ ├── apache │ └── commons │ │ └── httpclient │ │ ├── CircularRedirectException.java │ │ ├── HttpConnection.java │ │ ├── HttpMethod.java │ │ ├── HttpMethodBase.java │ │ ├── HttpMethodDirector.java │ │ └── contrib │ │ ├── ssl │ │ ├── AuthSSLInitializationError.java │ │ ├── AuthSSLProtocolSocketFactory.java │ │ ├── AuthSSLX509TrustManager.java │ │ ├── EasySSLProtocolSocketFactory.java │ │ ├── EasyX509TrustManager.java │ │ ├── HostConfigurationWithHostFactory.java │ │ ├── HostConfigurationWithStickyProtocol.java │ │ ├── HttpClientSSLTest.java │ │ ├── HttpHostFactory.java │ │ ├── SocketFactoryWrapper.java │ │ └── StrictSSLProtocolSocketFactory.java │ │ └── utils │ │ └── HttpMethodCloner.java │ ├── eclipse │ └── swt │ │ ├── custom │ │ ├── BalloonWindow.java │ │ ├── CustomSeparator.java │ │ ├── LiveSashForm.java │ │ ├── UrbanSashForm.java │ │ └── UrbanSashFormLayout.java │ │ └── snippets │ │ ├── Snippet163.java │ │ ├── Snippet163old.java │ │ ├── Snippet218.java │ │ ├── Snippet222.java │ │ ├── Snippet25.java │ │ ├── Snippet331.java │ │ └── Snippet332.java │ ├── json │ └── me │ │ ├── Ch5CompletionEditor.java │ │ ├── JSONArray.java │ │ ├── JSONException.java │ │ ├── JSONObject.java │ │ ├── JSONString.java │ │ ├── JSONStringer.java │ │ ├── JSONTokener.java │ │ ├── JSONWriter.java │ │ ├── SWTHelloWorld.java │ │ ├── SWTStyledTextExample.java │ │ ├── Snippet320AutoCompleteExample.java │ │ ├── StringWriter.java │ │ └── test │ │ ├── SyntaxData.java │ │ ├── SyntaxManager2.java │ │ ├── Test.java │ │ └── Uutt.java │ └── roussev │ └── http4e │ ├── ant │ └── AntReader.java │ ├── crypt │ ├── CryptConstants.java │ ├── CryptUtils.java │ ├── EncryptFacade.java │ ├── Errors.java │ ├── HexUtils.java │ ├── MiscUtils.java │ ├── TestCrypt.java │ ├── TestPublicPrivateKeys.java │ └── depricated │ │ ├── Qwe.java │ │ └── Version.java │ ├── editor │ └── xml │ │ ├── ColorManager.java │ │ ├── IXMLColorConstants.java │ │ ├── NonRuleBasedDamagerRepairer.java │ │ ├── XMLConfiguration.java │ │ ├── XMLDoubleClickStrategy.java │ │ ├── XMLPartitioner.java │ │ ├── XMLWhitespaceDetector.java │ │ ├── contentassist │ │ └── TagContentAssistProcessor.java │ │ ├── format │ │ ├── DefaultFormattingStrategy.java │ │ ├── DocTypeFormattingStrategy.java │ │ ├── PIFormattingStrategy.java │ │ ├── TextFormattingStrategy.java │ │ └── XMLFormattingStrategy.java │ │ ├── rules │ │ ├── CDataRule.java │ │ ├── EscapedCharRule.java │ │ ├── NonMatchingRule.java │ │ ├── StartTagRule.java │ │ └── XMLTextPredicateRule.java │ │ ├── scanners │ │ ├── CDataScanner.java │ │ ├── XMLPartitionScanner.java │ │ ├── XMLScanner.java │ │ ├── XMLTagScanner.java │ │ └── XMLTextScanner.java │ │ └── xmlattribs │ │ ├── XMLAttribute.java │ │ ├── XMLElement.java │ │ ├── XMLParser.java │ │ ├── XMLTree.java │ │ ├── XMLValidationError.java │ │ └── XMLValidationErrorHandler.java │ ├── httpclient │ └── core │ │ ├── CoreConstants.java │ │ ├── CoreContext.java │ │ ├── CoreImages.java │ │ ├── CoreMessages.java │ │ ├── CoreObjects.java │ │ ├── ExceptionHandler.java │ │ ├── client │ │ ├── misc │ │ │ ├── ApacheHttpListener.java │ │ │ ├── ApacheOutputStream.java │ │ │ ├── BusinessJob.java │ │ │ ├── EclipseHttpJob.java │ │ │ ├── HttpPerformer.java │ │ │ ├── JobListener.java │ │ │ └── JobRunner.java │ │ ├── model │ │ │ ├── AuthItem.java │ │ │ ├── FolderModel.java │ │ │ ├── Item.java │ │ │ ├── ItemModel.java │ │ │ ├── Model.java │ │ │ ├── ModelEvent.java │ │ │ ├── ModelListener.java │ │ │ └── ProxyItem.java │ │ └── view │ │ │ ├── AnimatedGIFRunner.java │ │ │ ├── Animator.java │ │ │ ├── AttachManager.java │ │ │ ├── BodyView.java │ │ │ ├── ClipboardMenu.java │ │ │ ├── ExecuteCommand.java │ │ │ ├── ExecuteKeyListener.java │ │ │ ├── FolderView.java │ │ │ ├── HeaderView.java │ │ │ ├── HexManager.java │ │ │ ├── IControlView.java │ │ │ ├── ItemState.java │ │ │ ├── ItemView.java │ │ │ ├── JSONLineStyler.java │ │ │ ├── ParamTable.java │ │ │ ├── ParamTableView.java │ │ │ ├── ParamTextView.java │ │ │ ├── ParamView.java │ │ │ ├── ParameterizeTextView.java │ │ │ ├── ParamsAttachManager.java │ │ │ ├── PayloadMenu.java │ │ │ ├── RequestView.java │ │ │ ├── ResponseView.java │ │ │ ├── SWTHelloWorld.java │ │ │ ├── Utils.java │ │ │ ├── ViewUtils.java │ │ │ └── assist │ │ │ ├── AssistConstants.java │ │ │ ├── AssistUtils.java │ │ │ ├── AstandaloneHEditor.java │ │ │ ├── DocumentUtils.java │ │ │ ├── HAssistInfoMap.java │ │ │ ├── HCommentScanner.java │ │ │ ├── HConfiguration.java │ │ │ ├── HContentAssistProcessor.java │ │ │ ├── HDefaultScanner.java │ │ │ ├── HDoubleClickStrategy.java │ │ │ ├── HPartitionScanner.java │ │ │ ├── HValueScanner.java │ │ │ ├── ModelTrackerListener.java │ │ │ ├── MyAnnotationHover.java │ │ │ ├── MyTextHover.java │ │ │ ├── Tracker.java │ │ │ └── WhitespaceDetector.java │ │ ├── misc │ │ ├── ColorManagerAdaptor.java │ │ ├── CoreException.java │ │ ├── LazyObjects.java │ │ ├── ResourceCache.java │ │ ├── Scripts.java │ │ └── Styles.java │ │ └── util │ │ ├── BaseUtils.java │ │ ├── FileCopy.java │ │ ├── HttpBean.java │ │ ├── HttpUtils.java │ │ ├── JsonUtil.java │ │ ├── JunkUtils.java │ │ ├── ParseBean.java │ │ ├── ParseUtils.java │ │ ├── ResourceUtils.java │ │ ├── ResponseReader.java │ │ ├── StringPrintWriter.java │ │ ├── SwtUtils.java │ │ ├── Translator.java │ │ └── shared │ │ ├── ExportJavaViewer.java │ │ ├── Exported.java │ │ └── PrinterFacade.java │ ├── java6 │ └── Properties6.java │ └── jmeter │ ├── Constants.java │ ├── ExportSessionsTransformer.java │ ├── ExportTemplateTransformer.java │ ├── HttpToJmxTransformer.java │ └── LiveHttpHeadersParser.java ├── http4e-Feature ├── .classpath ├── .project ├── ant.project.xml ├── build.properties └── feature.xml ├── http4e-Plugin ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.jdt.ui.prefs ├── META-INF │ └── MANIFEST.MF ├── about.html ├── about.ini ├── about.png ├── ant.project.xml ├── build.properties ├── icons │ ├── auth.png │ ├── auth_enabled copy.png │ ├── auth_enabled.png │ ├── auth_tab.png │ ├── csharp.gif │ ├── duplicate.gif │ ├── export.gif │ ├── flex.gif │ ├── help.png │ ├── import.gif │ ├── java.png │ ├── jmeter.gif │ ├── jmeter.png │ ├── js.gif │ ├── logo-dialog.png │ ├── logo.png │ ├── magn.png │ ├── oc.gif │ ├── params.png │ ├── php.gif │ ├── print.png │ ├── print_edit.gif │ ├── proxy.png │ ├── proxy_enabled copy.png │ ├── proxy_enabled.png │ ├── proxy_tab.png │ ├── python.gif │ ├── ruby.gif │ ├── saveas_edit.gif │ ├── tab-new.png │ ├── vb.gif │ └── views.png ├── lib │ └── commons-lang-2.3.jar ├── plugin.xml ├── resources │ ├── about.html │ ├── export.html │ ├── form2result.html │ └── src.html ├── run.product.xml └── src │ └── app │ └── org │ └── roussev │ └── http4e │ └── httpclient │ └── ui │ ├── HdContentViewer.java │ ├── HdPlugin.java │ ├── HdViewPart.java │ ├── UIConstants.java │ ├── actions │ ├── AboutDialog.java │ ├── AddTabAction.java │ ├── AuthDialog.java │ ├── AuthenticationAction.java │ ├── ConfigAction.java │ ├── ConfigDialog.java │ ├── DuplicateTabAction.java │ ├── ExportAjaxJQueryAction.java │ ├── ExportAjaxJSAction.java │ ├── ExportAjaxPrototypeAction.java │ ├── ExportCocoaAction.java │ ├── ExportCsAction.java │ ├── ExportDialog.java │ ├── ExportEmptyAction.java │ ├── ExportFlexAction.java │ ├── ExportHTTP4eAction.java │ ├── ExportJMeterAction.java │ ├── ExportJavaHttp3Action.java │ ├── ExportJavaHttp4Action.java │ ├── ExportMenuAction.java │ ├── ExportPHPAction.java │ ├── ExportPythonAction.java │ ├── ExportRubyAction.java │ ├── ExportVbAction.java │ ├── HdActionDelegate.java │ ├── HdJavaEditorInput.java │ ├── HelpAboutAction.java │ ├── HelpDropDownAction.java │ ├── ImportDialog.java │ ├── ImportHTTP4eAction.java │ ├── ImportLiveHttpHeadersAction.java │ ├── ImportMenuAction.java │ ├── ImportPacketAction.java │ ├── ParameterizeAction.java │ ├── ParameterizeDialog.java │ ├── PrintAction.java │ ├── ProxyAction.java │ ├── ProxyDialog.java │ ├── TabCloseAction.java │ └── ToolsAction.java │ ├── dialog │ └── example │ │ ├── DumbUser.java │ │ ├── GetUserInput.java │ │ ├── PrintDialogExample.java │ │ └── ShowMyTitleAreaDialog.java │ └── preferences │ ├── HTTPClientPreferencePage.java │ ├── PreferenceConstants.java │ ├── PreferenceInitializer.java │ ├── ProxyItemListEditor.java │ └── SSLEditor.java ├── http4e-Site ├── category.xml └── pom.xml ├── pom.xml └── site.xml /.gitignore: -------------------------------------------------------------------------------- 1 | /classes 2 | /.class 3 | /.build 4 | 5 | # maven stuff 6 | target 7 | .polyglot.build.properties 8 | -------------------------------------------------------------------------------- /.mvn/extensions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | org.eclipse.tycho.extras 5 | tycho-pomless 6 | 1.0.0 7 | 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | HTTP4e 2 | ==== 3 | 4 | HTTP4e is an Eclipse HTTP Client plugin simplifying REST and Web Service testing, enabling developer to make HTTP packets directly from Eclipse. The packets include all HTTP requests, responses and the HTTP headers (which contain the cookies and caching information). It is a useful tool for HTTP header tampering and hacking, allowing HTTP code generation to a programming language of choice, as well as JMeter load testing. 5 | 6 | 7 | ### More information 8 | http://nextinterfaces.com/http4e 9 | 10 | 11 | ![alt tag](http://nextinterfaces.com/http4e/images/main.png) 12 | 13 | ### Key Features 14 | * Multiple Tabs 15 | * Auto Suggest (CTRL + SPACE) 16 | * Response view format into Raw, Pretty, JSON, HEX, Browser DOM 17 | * SSL/HTTPS and Unicode support 18 | * Basic/Digest authentication 19 | * Proxy support 20 | * Parameterization of Headers/HTTP-Params 21 | * HTTP code export to Java, JavaScript, Prototype, jQuery, Flex, ActionScript, C#, VisualBasic, Ruby, Python, PHP, Cocoa and JMeter 22 | * One click HTML Report generation 23 | * Multipart Form support 24 | 25 | 26 | ### Install URL 27 | http://nextinterfaces.com/http4e/install 28 | 29 | Build Instructions 30 | -------------- 31 | 32 | ## With Ant 33 | 34 | ``` 35 | project-root> ant 36 | ``` 37 | 38 | This will generate 39 | 40 | ``` 41 | install/ 42 | features/ 43 | plugins/ 44 | http4e-eclipse-rest-http-client.tar 45 | ``` 46 | 47 | ## With Maven 48 | 49 | ``` 50 | project-root> mvn build 51 | ``` 52 | 53 | And look into `http4e-Site/target` 54 | 55 | To update version 56 | ```bash 57 | mvn org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=5.0.13-SNAPSHOT 58 | ``` 59 | 60 | 61 | 62 | License 63 | -------------- 64 | Apache License v.2.0 65 | 66 | 67 | with-Eclipse logo 68 | 69 | -------------------------------------------------------------------------------- /ant.properties: -------------------------------------------------------------------------------- 1 | ide.version=3.2 2 | product.version=5.0.12 3 | product.tar=http4e-eclipse-rest-http-client.tar 4 | 5 | project.feature=feature 6 | project.core=org.roussev.http4e.core 7 | project.plugin=org.roussev.http4e.ui 8 | -------------------------------------------------------------------------------- /build.xml: -------------------------------------------------------------------------------- 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 | Preparing Tar Product including: 44 | features/${project.plugin}_${product.version}.jar, 45 | plugins/${project.plugin}_${product.version}.jar, 46 | plugins/${project.core}_${product.version}.jar 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/com.ibm.icu_3.4.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/com.ibm.icu_3.4.5.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.core.commands_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.core.commands_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.core.contenttype_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.core.contenttype_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.core.expressions_3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.core.expressions_3.2.1.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.core.filebuffers_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.core.filebuffers_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.core.jobs_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.core.jobs_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.core.resources_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.core.resources_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.core.runtime.compatibility.auth_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.core.runtime.compatibility.auth_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.core.runtime_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.core.runtime_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.equinox.common_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.equinox.common_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.equinox.preferences_3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.equinox.preferences_3.2.1.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.equinox.registry_3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.equinox.registry_3.2.1.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.help_3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.help_3.2.1.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.jface.databinding_1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.jface.databinding_1.0.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.jface.text_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.jface.text_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.jface_3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.jface_3.2.1.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.osgi_3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.osgi_3.2.1.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.rcp_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.rcp_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.swt.win32.win32.x86_3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.swt.win32.win32.x86_3.2.1.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.swt_3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.swt_3.2.1.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.text_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.text_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.ui.editors_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.ui.editors_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.ui.ide_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.ui.ide_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.ui.workbench.texteditor_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.ui.workbench.texteditor_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.ui.workbench_3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.ui.workbench_3.2.1.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.ui_3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.ui_3.2.1.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.2/sdk/org.eclipse.update.configurator_3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.2/sdk/org.eclipse.update.configurator_3.2.1.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/com.ibm.icu_3.4.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/com.ibm.icu_3.4.5.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/commons-codec-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/commons-codec-1.3.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/commons-httpclient-3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/commons-httpclient-3.1.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/commons-lang-2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/commons-lang-2.3.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/commons-logging.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/commons-logging.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.core.commands_3.3.0.I20070605-0010.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.core.commands_3.3.0.I20070605-0010.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.core.contenttype_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.core.contenttype_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.core.expressions_3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.core.expressions_3.2.1.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.core.filebuffers_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.core.filebuffers_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.core.jobs_3.3.0.v20070423.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.core.jobs_3.3.0.v20070423.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.core.resources_3.3.0.v20070604.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.core.resources_3.3.0.v20070604.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.core.runtime.compatibility.auth_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.core.runtime.compatibility.auth_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.core.runtime_3.3.100.v20070530.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.core.runtime_3.3.100.v20070530.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.equinox.common_3.3.0.v20070426.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.equinox.common_3.3.0.v20070426.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.equinox.preferences_3.2.100.v20070522.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.equinox.preferences_3.2.100.v20070522.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.equinox.registry_3.3.0.v20070522.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.equinox.registry_3.3.0.v20070522.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.help_3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.help_3.2.1.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.jface.databinding_1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.jface.databinding_1.0.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.jface.text_3.3.0.v20070606-0010.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.jface.text_3.3.0.v20070606-0010.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.jface_3.3.0.I20070606-0010.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.jface_3.3.0.I20070606-0010.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.osgi_3.3.0.v20070530.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.osgi_3.3.0.v20070530.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.rcp_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.rcp_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.swt.win32.win32.x86_3.3.0.v3346.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.swt.win32.win32.x86_3.3.0.v3346.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.swt_3.3.0.v3346.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.swt_3.3.0.v3346.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.text_3.3.0.v20070606-0010.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.text_3.3.0.v20070606-0010.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.ui.editors_3.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.ui.editors_3.2.0.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.ui.ide_3.3.0.I20070620.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.ui.ide_3.3.0.I20070620.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.ui.workbench.texteditor_3.3.0.v20070606-0010.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.ui.workbench.texteditor_3.3.0.v20070606-0010.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.ui.workbench_3.3.0.I20070608-1100.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.ui.workbench_3.3.0.I20070608-1100.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.ui_3.3.0.I20070614-0800.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.ui_3.3.0.I20070614-0800.jar -------------------------------------------------------------------------------- /eclipse.sdk/3.3/org.eclipse.update.configurator_3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/eclipse.sdk/3.3/org.eclipse.update.configurator_3.2.1.jar -------------------------------------------------------------------------------- /http4e-Core/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /http4e-Core/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | http4e-Core 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 | -------------------------------------------------------------------------------- /http4e-Core/.settings/org.eclipse.jdt.ui.prefs: -------------------------------------------------------------------------------- 1 | #Sun Jan 15 21:26:47 PST 2012 2 | eclipse.preferences.version=1 3 | formatter_profile=_http4e 4 | formatter_settings_version=11 5 | org.eclipse.jdt.ui.text.custom_code_templates=\r\n 6 | -------------------------------------------------------------------------------- /http4e-Core/.settings/org.eclipse.ltk.core.refactoring.prefs: -------------------------------------------------------------------------------- 1 | #Sat Aug 25 13:27:21 PDT 2007 2 | eclipse.preferences.version=1 3 | org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false 4 | -------------------------------------------------------------------------------- /http4e-Core/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: Eclipse HttpClient (HTTP4e) Core 4 | Bundle-SymbolicName: org.roussev.http4e.core 5 | Bundle-Version: 5.0.12 6 | Bundle-Vendor: NEXTinterfaces.com 7 | Bundle-Localization: plugin 8 | Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0.0)", 9 | org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)", 10 | org.eclipse.swt;bundle-version="[3.2.0,4.0.0)";visibility:=reexport, 11 | org.eclipse.ui.ide, 12 | org.eclipse.core.resources, 13 | org.eclipse.jface.text, 14 | com.ibm.icu 15 | Export-Package: org.apache.commons.lang.text, 16 | org.roussev.http4e.httpclient.core, 17 | org.roussev.http4e.httpclient.core.client.misc, 18 | org.roussev.http4e.httpclient.core.client.model, 19 | org.roussev.http4e.httpclient.core.client.view, 20 | org.roussev.http4e.httpclient.core.util, 21 | org.roussev.http4e.httpclient.core.util.shared 22 | Bundle-ClassPath: lib/commons-codec-1.3.jar, 23 | lib/commons-logging.jar, 24 | lib/commons-httpclient-3.1-beta1-m.jar, 25 | lib/commons-lang-2.3.jar, 26 | lib/velocity-1.6.3.jar, 27 | lib/velocity-1.6.3-dep.jar, 28 | lib/xom-1.2.4.jar, 29 | . 30 | -------------------------------------------------------------------------------- /http4e-Core/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /http4e-Core/ant.project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /http4e-Core/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/app/ 2 | output.. = classes/ 3 | bin.includes = META-INF/,\ 4 | .,\ 5 | about.html,\ 6 | icons/,\ 7 | resources/,\ 8 | lib/commons-codec-1.3.jar,\ 9 | lib/commons-logging.jar,\ 10 | lib/commons-lang-2.3.jar,\ 11 | lib/velocity-1.6.3.jar,\ 12 | lib/velocity-1.6.3-dep.jar,\ 13 | lib/xom-1.2.4.jar,\ 14 | lib/commons-httpclient-3.1-beta1-m.jar 15 | jars.compile.order = lib/commons-codec-1.3.jar,\ 16 | lib/commons-logging.jar,\ 17 | lib/commons-httpclient-3.1-beta1-m.jar,\ 18 | lib/commons-lang-2.3.jar,\ 19 | lib/velocity-1.6.3.jar,\ 20 | lib/velocity-1.6.3-dep.jar,\ 21 | lib/xom-1.2.4.jar,\ 22 | . 23 | 24 | -------------------------------------------------------------------------------- /http4e-Core/icons/assist-header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/assist-header.png -------------------------------------------------------------------------------- /http4e-Core/icons/assist-param.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/assist-param.png -------------------------------------------------------------------------------- /http4e-Core/icons/assist-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/assist-template.png -------------------------------------------------------------------------------- /http4e-Core/icons/blank16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/blank16.gif -------------------------------------------------------------------------------- /http4e-Core/icons/browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/browser.png -------------------------------------------------------------------------------- /http4e-Core/icons/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/delete.png -------------------------------------------------------------------------------- /http4e-Core/icons/file-open-dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/file-open-dis.png -------------------------------------------------------------------------------- /http4e-Core/icons/file-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/file-open.png -------------------------------------------------------------------------------- /http4e-Core/icons/go.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/go.gif -------------------------------------------------------------------------------- /http4e-Core/icons/hex.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/hex.gif -------------------------------------------------------------------------------- /http4e-Core/icons/hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/hex.png -------------------------------------------------------------------------------- /http4e-Core/icons/json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/json.png -------------------------------------------------------------------------------- /http4e-Core/icons/loading-small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/loading-small.gif -------------------------------------------------------------------------------- /http4e-Core/icons/loading-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/loading-small.png -------------------------------------------------------------------------------- /http4e-Core/icons/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/logo.png -------------------------------------------------------------------------------- /http4e-Core/icons/logok.png: -------------------------------------------------------------------------------- 1 | MIIBtzCCASwGByqGSM44BAEwggEfAoGBAP1/U4EddRIpUt9KnC7s5Of2EbdSPO9EAMMeP4C2USZpRV1AIlH7WT2NWPq/xfW6MPbLm1Vs14E7gB00b/JmYLdrmVClpJ+f6AR7ECLCT7up1/63xhv4O1fnxqimFQ8E+4P208UewwI1VBNaFpEy9nXzrith1yrv8iIDGZ3RSAHHAhUAl2BQjxUjC8yykrmCouuEC/BYHPUCgYEA9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSoDgYQAAoGALToPnc8lb4EFGzM3lrDmwG6rS89Hf2xRaaqc4FiK+7qQ2aaLtVsxkKlEdMRmWzOTvf3oBVbqQaWGKMLZGUcVQ38oArxJWgIXDyVGu2K5kzh59uOEoTsJtnslDjuqc2B8N44z1f6DHy5EjQOqe/26VepTLCvM4psjYWVYtg5J9nA= -------------------------------------------------------------------------------- /http4e-Core/icons/pretty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/pretty.png -------------------------------------------------------------------------------- /http4e-Core/icons/progress_stop_off.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/progress_stop_off.gif -------------------------------------------------------------------------------- /http4e-Core/icons/progress_stop_on.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/progress_stop_on.gif -------------------------------------------------------------------------------- /http4e-Core/icons/raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/raw.png -------------------------------------------------------------------------------- /http4e-Core/icons/title-line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/title-line.png -------------------------------------------------------------------------------- /http4e-Core/icons/view-fullscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/icons/view-fullscreen.png -------------------------------------------------------------------------------- /http4e-Core/lib/commons-codec-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/lib/commons-codec-1.3.jar -------------------------------------------------------------------------------- /http4e-Core/lib/commons-httpclient-3.1-beta1-m.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/lib/commons-httpclient-3.1-beta1-m.jar -------------------------------------------------------------------------------- /http4e-Core/lib/commons-lang-2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/lib/commons-lang-2.3.jar -------------------------------------------------------------------------------- /http4e-Core/lib/commons-logging.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/lib/commons-logging.jar -------------------------------------------------------------------------------- /http4e-Core/lib/velocity-1.6.3-dep.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/lib/velocity-1.6.3-dep.jar -------------------------------------------------------------------------------- /http4e-Core/lib/velocity-1.6.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/lib/velocity-1.6.3.jar -------------------------------------------------------------------------------- /http4e-Core/lib/xom-1.2.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/lib/xom-1.2.4.jar -------------------------------------------------------------------------------- /http4e-Core/resources/Info-Accept-Charset.properties: -------------------------------------------------------------------------------- 1 | big5=Chinese Traditional (Big5) 2 | euc-kr=Korean (EUC) 3 | iso-8859-1=Western Alphabet 4 | iso-8859-2=Central European Alphabet (ISO) 5 | iso-8859-3=Latin 3 Alphabet (ISO) 6 | iso-8859-4=Baltic Alphabet (ISO) 7 | iso-8859-5=Cyrillic Alphabet (ISO) 8 | iso-8859-6=Arabic Alphabet (ISO) 9 | iso-8859-7=Greek Alphabet (ISO) 10 | iso-8859-8=Hebrew Alphabet (ISO) 11 | koi8-r=Cyrillic Alphabet (KOI8-R) 12 | shift-jis=Japanese (Shift-JIS) 13 | x-euc=Japanese (EUC) 14 | utf-8=Universal Alphabet (UTF-8) 15 | windows-1250=Central European Alphabet (Windows) 16 | windows-1251=Cyrillic Alphabet (Windows) 17 | windows-1252=Western Alphabet (Windows) 18 | windows-1253=Greek Alphabet (Windows) 19 | windows-1254=Turkish Alphabet 20 | windows-1255=Hebrew Alphabet (Windows) 21 | windows-1256=Arabic Alphabet (Windows) 22 | windows-1257=Baltic Alphabet (Windows) 23 | windows-1258=Vietnamese Alphabet (Windows) 24 | windows-874=Thai (Windows) -------------------------------------------------------------------------------- /http4e-Core/resources/Info-Content-MD5.properties: -------------------------------------------------------------------------------- 1 | md5-digest= -------------------------------------------------------------------------------- /http4e-Core/resources/Info-Content-Type.properties: -------------------------------------------------------------------------------- 1 | application/x-www-form-urlencoded=
application/x-www-form-urlencoded

Default content type. Forms submitted with this content type must be URL encoded.

The control names/values are listed in the order they appear in the document. The name is separated from the value by '=' and name/value pairs are separated from each other by '&'

2 | multipart/form-data=
multipart/form-data

Should be used for submitting forms that contain files, non-ASCII data, and binary data.

It follows the rules of all multipart MIME data streams.

A "multipart/form-data" message contains a series of parts.

-------------------------------------------------------------------------------- /http4e-Core/resources/Info-Properties.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/resources/Info-Properties.rar -------------------------------------------------------------------------------- /http4e-Core/resources/cocoa-delete.vm: -------------------------------------------------------------------------------- 1 | /* 2 | This is a Cocoa HTTP client generated by HTTP4e (http://www.nextinterfaces.com) 3 | */ 4 | NSString *baseUrlString = @"$httpBean.urlNoQuery"; 5 | NSString *queryTerm = @"$httpBean.queryTerm"; 6 | NSString *urlString = [[NSString alloc] initWithFormat:@"%@%@", baseUrlString, queryTerm]; 7 | NSURL *url = [[NSURL alloc] initWithString:urlString]; 8 | NSMutableURLRequest *req = [[NSMutableURLRequest alloc] initWithURL:url]; 9 | [req setHTTPMethod:@"DELETE"]; 10 | NSHTTPURLResponse* urlResponse = nil; 11 | NSError *error = [[NSError alloc] init]; 12 | NSData *responseData = [NSURLConnection sendSynchronousRequest:req 13 | returningResponse:&urlResponse 14 | error:&error]; 15 | NSString *result = [[NSString alloc] initWithData:responseData 16 | encoding:NSUTF8StringEncoding]; 17 | 18 | NSLog(@"Response Code: %d", [urlResponse statusCode]); 19 | if ([urlResponse statusCode] >= 200 && [urlResponse statusCode] < 300) 20 | NSLog(@"Response: %@", result); 21 | 22 | [url release]; 23 | [baseUrlString release]; 24 | [req release]; 25 | [result release]; -------------------------------------------------------------------------------- /http4e-Core/resources/cocoa-get.vm: -------------------------------------------------------------------------------- 1 | /* 2 | This is a Cocoa HTTP client generated by HTTP4e (http://www.nextinterfaces.com) 3 | */ 4 | NSString *baseUrlString = @"$httpBean.urlNoQuery"; 5 | NSString *queryTerm = @"$httpBean.queryTerm"; 6 | NSString *urlString = [[NSString alloc] initWithFormat:@"%@%@", baseUrlString, queryTerm]; 7 | NSURL *url = [[NSURL alloc] initWithString:urlString]; 8 | NSMutableURLRequest *req = [[NSMutableURLRequest alloc] initWithURL:url]; 9 | [req setHTTPMethod:@"GET"]; 10 | NSHTTPURLResponse* urlResponse = nil; 11 | NSError *error = [[NSError alloc] init]; 12 | NSData *responseData = [NSURLConnection sendSynchronousRequest:req 13 | returningResponse:&urlResponse 14 | error:&error]; 15 | NSString *result = [[NSString alloc] initWithData:responseData 16 | encoding:NSUTF8StringEncoding]; 17 | 18 | NSLog(@"Response Code: %d", [urlResponse statusCode]); 19 | NSLog(@"Content-Type: %@", [[response allHeaderFields] objectForKey:@"Content-Type"]); 20 | if ([urlResponse statusCode] >= 200 && [urlResponse statusCode] < 300) 21 | NSLog(@"Response: %@", result); 22 | 23 | [url release]; 24 | [baseUrlString release]; 25 | [req release]; 26 | [result release]; 27 | 28 | -------------------------------------------------------------------------------- /http4e-Core/resources/cocoa-post.vm: -------------------------------------------------------------------------------- 1 | /* 2 | This is a Cocoa HTTP client generated by HTTP4e (http://www.nextinterfaces.com) 3 | */ 4 | NSString *urlString = @"$httpBean.url"; 5 | NSURL *url = [[NSURL alloc] initWithString:urlString]; 6 | NSMutableURLRequest *req = [[NSMutableURLRequest alloc] initWithURL:url]; 7 | [req setHTTPMethod:@"POST"]; 8 | 9 | NSData *putParams = [@"$httpBean.body" dataUsingEncoding:NSUTF8StringEncoding]; 10 | [req setHTTPBody: putParams]; 11 | 12 | NSHTTPURLResponse* urlResponse = nil; 13 | NSError *error = [[NSError alloc] init]; 14 | NSData *responseData = [NSURLConnection sendSynchronousRequest:req 15 | returningResponse:&urlResponse 16 | error:&error]; 17 | NSString *result = [[NSString alloc] initWithData:responseData 18 | encoding:NSUTF8StringEncoding]; 19 | 20 | NSLog(@"Response Code: %d", [urlResponse statusCode]); 21 | if ([urlResponse statusCode] >= 200 && [urlResponse statusCode] < 300) 22 | NSLog(@"Response: %@", result); 23 | 24 | [urlString release]; 25 | [url release]; 26 | [req release]; 27 | [result release] -------------------------------------------------------------------------------- /http4e-Core/resources/cocoa-put.vm: -------------------------------------------------------------------------------- 1 | /* 2 | This is a Cocoa HTTP client generated by HTTP4e (http://www.nextinterfaces.com) 3 | */ 4 | NSString *baseURLString = @"$httpBean.url"; 5 | NSString *urlString = [[NSString alloc] initWithFormat:@"%@", baseURLString]; 6 | NSURL *url = [[NSURL alloc] initWithString:urlString]; 7 | NSMutableURLRequest *req = [[NSMutableURLRequest alloc] initWithURL:url]; 8 | [req setHTTPMethod:@"PUT"]; 9 | #foreach( $hKey in $httpBean.headers.keySet() ) 10 | [req setValue:@"$httpBean.headers.get($hKey)" forHTTPHeaderField:@"$hKey"]; 11 | #end 12 | 13 | NSData *paramData = [@"$httpBean.body" dataUsingEncoding:NSUTF8StringEncoding]; 14 | [req setHTTPBody: paramData]; 15 | 16 | NSHTTPURLResponse* urlResponse = nil; 17 | NSError* error = [[NSError alloc] init]; 18 | NSData *responseData = [NSURLConnection sendSynchronousRequest:req 19 | returningResponse:&urlResponse 20 | error:&error]; 21 | NSString *result = [[NSString alloc] initWithData:responseData 22 | encoding:NSUTF8StringEncoding]; 23 | NSLog(@"Response Code: %d", [urlResponse statusCode]); 24 | if ([urlResponse statusCode] >= 200 && [urlResponse statusCode] < 300) 25 | NSLog(@"Result: %@", result); 26 | 27 | [urlString release]; 28 | [url release]; 29 | [result release]; 30 | [req release]; -------------------------------------------------------------------------------- /http4e-Core/resources/headers.properties: -------------------------------------------------------------------------------- 1 | Accept 2 | Accept-Charset 3 | Accept-Encoding 4 | Accept-Language 5 | Accept-Ranges 6 | Age 7 | Allow 8 | Authorization 9 | Cache-Control 10 | Connection 11 | Content-Encoding 12 | Content-Language 13 | Content-Length 14 | Content-Location 15 | Content-MD5 16 | Content-Range 17 | Content-Type 18 | Cookie 19 | Date 20 | ETag 21 | Expect 22 | Expires 23 | From 24 | Host 25 | If-Match 26 | If-Modified-Since 27 | If-None-Match 28 | If-Range 29 | If-Unmodified-Since 30 | Last-Modified 31 | Location 32 | Max-Forwards 33 | Pragma 34 | Proxy-Authenticate 35 | Proxy-Authorization 36 | Range 37 | Referer 38 | Retry-After 39 | Server 40 | TE 41 | Trailer 42 | Transfer-Encoding 43 | Upgrade 44 | User-Agent 45 | Vary 46 | Via 47 | Warning 48 | WWW-Authenticate -------------------------------------------------------------------------------- /http4e-Core/resources/http4e-item.vm: -------------------------------------------------------------------------------- 1 | 2 | View All 3 |
$httpBean.request
4 | 
5 | 6 |
$httpBean.response
7 | 
8 | 9 | -------------------------------------------------------------------------------- /http4e-Core/resources/http4e-sessions.vm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | #foreach( $httpBean in $httpbeans ) 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | #end 26 | 27 |
 #MethodProtocolHostURLBodyContent-Type
View$httpBean.id$httpBean.method$httpBean.protocol$httpBean.domain$httpBean.path$httpBean.bodyShort$httpBean.contentType
28 | -------------------------------------------------------------------------------- /http4e-Core/resources/js-jquery.vm: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /http4e-Core/resources/js-prototype.vm: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /http4e-Core/resources/js-xhr.vm: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /http4e-Core/resources/php.vm: -------------------------------------------------------------------------------- 1 | "$httpBean.headers.get($hKey)", 10 | #end 11 | ); 12 | $body = "$httpBean.body"; 13 | 14 | /*------- 15 | * HTTP_Client call (http://pear.php.net/package/HTTP_Client) 16 | */ 17 | $client = new HTTP_Client(); 18 | $httpBean.phpMethod 19 | 20 | echo $responseCode 21 | 22 | $resp = $client->currentResponse(); 23 | $data = $resp['body']; 24 | 25 | echo $data 26 | // load XML data 27 | //$dom = new DomDocument(); 28 | //$dom->loadXML( $data ); 29 | 30 | /*------- 31 | * CURL synchronous call 32 | */ 33 | function request($method, $url, $headers = array(), $body) { 34 | $conn = curl_init(); 35 | curl_setopt($conn, CURLOPT_URL, $url); 36 | curl_setopt($conn, CURLOPT_HTTPHEADER, $headers); 37 | curl_setopt($conn, CURLOPT_USERAGENT, "HTTP4e/3.0"); 38 | curl_setopt($conn, CURLOPT_CUSTOMREQUEST, strtoupper($method)); 39 | curl_setopt($conn, CURLOPT_POSTFIELDS, $xml_data); 40 | curl_setopt($conn, CURLOPT_RETURNTRANSFER, 1); 41 | $data = curl_exec($conn); 42 | $code = curl_getinfo($conn, CURLINFO_HTTP_CODE); 43 | echo $code 44 | curl_close($conn); 45 | return $data; 46 | } 47 | ?> -------------------------------------------------------------------------------- /http4e-Core/resources/python.vm: -------------------------------------------------------------------------------- 1 | """ 2 | This is a Python HTTP client generated by HTTP4e (http://www.nextinterfaces.com) 3 | """ 4 | import simplejson 5 | import httplib, urllib 6 | 7 | method = "$httpBean.method" 8 | host = "$httpBean.server" 9 | uri = "$httpBean.path" 10 | body = "$httpBean.body" 11 | headers = { 12 | #foreach( $hKey in $httpBean.headers.keySet() ) 13 | "$hKey": "$httpBean.headers.get($hKey)", 14 | #end 15 | } 16 | 17 | 18 | def request(method, host, uri, body, headers = {}): 19 | conn = httplib.HTTPConnection(host) 20 | conn.request(method.upper(), uri, body, headers) 21 | response = conn.getresponse() 22 | print response.status, response.reason 23 | if response.status == 200: 24 | """ 25 | Load a JSON data 26 | obj = simplejson.loads(response.read()) 27 | """ 28 | obj = response.read() 29 | return obj 30 | else: 31 | print response.status, response.reason, response.read() 32 | conn.close() 33 | 34 | """ 35 | Execute the HTTP call 36 | """ 37 | request(method, host, uri, body, headers = {}): -------------------------------------------------------------------------------- /http4e-Core/resources/ruby.vm: -------------------------------------------------------------------------------- 1 | =begin 2 | // This is a sample Ruby client featuring Net::HTTP and Rest-client 3 | // Generated by HTTP4e http://www.nextinterfaces.com 4 | =end 5 | # Importing external Ruby Rest-client http://rdoc.info/projects/archiloque/rest-client 6 | require 'rest_client' 7 | require 'net/http' 8 | require 'uri' 9 | 10 | 11 | def request(method, url, headers, body, params = nil) 12 | url = URI.parse(url) 13 | Net::HTTP.start(url.host, url.port) do |http| 14 | req = nil 15 | case method.upcase 16 | when "GET": 17 | req = Net::HTTP::Get.new(url.path, headers) 18 | when "POST": 19 | req = Net::HTTP::Post.new(url.path, headers) 20 | when "PUT": 21 | req = Net::HTTP::Put.new(url.path, headers) 22 | when "DELETE": 23 | req = Net::HTTP::Delete.new(url.path, headers) 24 | when "HEAD": 25 | req = Net::HTTP::Head.new(url.path, headers) 26 | when "OPTIONS": 27 | req = Net::HTTP::Options.new(url.path, headers) 28 | when "TRACE": 29 | req = Net::HTTP::Trace.new(url.path, headers) 30 | else 31 | raise Exception.new("Invalid HTTP method") 32 | end 33 | 34 | # // req.basic_auth "username", "password" 35 | 36 | # // Using req.set_form_data will override your "Content-Type" to "application/x-www-form-urlencoded" 37 | # // req.set_form_data(params) if not params == nil 38 | 39 | # // Use either body params with Content-Type=application/x-www-form-urlencoded or 40 | # // req.set_form_data to apply the params directly 41 | req.body = body 42 | 43 | resp = http.request(req) 44 | 45 | # // handle the response 46 | print resp.code + " " + resp.message + " " + resp.body 47 | end 48 | end 49 | 50 | 51 | if __FILE__ == $0 52 | 53 | url = '$httpBean.url' 54 | body = '$httpBean.body' 55 | headers = { 56 | #foreach( $hKey in $httpBean.headers.keySet() ) 57 | '$hKey' => '$httpBean.headers.get($hKey)', 58 | #end 59 | } 60 | params = {} 61 | 62 | # // Executing Rest-client 63 | client = RestClient::Resource.new url 64 | $httpBean.rubyMethod 65 | 66 | # // Executing Net::HTTP 67 | request("$httpBean.method", url, headers, body, params) 68 | 69 | end -------------------------------------------------------------------------------- /http4e-Core/resources/vb.vm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Core/resources/vb.vm -------------------------------------------------------------------------------- /http4e-Core/src/app/com/gargoylesoftware/htmlunit/ssl/InsecureTrustManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2002-2009 Gargoyle Software Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | package com.gargoylesoftware.htmlunit.ssl; 16 | 17 | import java.security.cert.CertificateException; 18 | import java.security.cert.X509Certificate; 19 | 20 | import javax.net.ssl.X509TrustManager; 21 | 22 | /** 23 | * A completely insecure (yet very easy to use) x509 trust manager. This manager trusts all servers 24 | * and all clients, regardless of credentials or lack thereof. 25 | * 26 | * @version $Revision: 4002 $ 27 | * @author Daniel Gredler 28 | * @created Nov 12, 2004 29 | */ 30 | public class InsecureTrustManager implements X509TrustManager { 31 | 32 | /** 33 | * {@inheritDoc} 34 | */ 35 | public void checkClientTrusted(final X509Certificate[] chain, final String authType) throws CertificateException { 36 | // Everyone is trusted! 37 | } 38 | 39 | /** 40 | * {@inheritDoc} 41 | */ 42 | public void checkServerTrusted(final X509Certificate[] chain, final String authType) throws CertificateException { 43 | // Everyone is trusted! 44 | } 45 | 46 | /** 47 | * {@inheritDoc} 48 | */ 49 | public X509Certificate[] getAcceptedIssuers() { 50 | return new X509Certificate[0]; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/apache/commons/httpclient/contrib/ssl/AuthSSLInitializationError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/AuthSSLInitializationError.java,v 1.2 2004/06/10 18:25:24 olegk Exp $ 3 | * $Revision$ 4 | * $Date$ 5 | * 6 | * ==================================================================== 7 | * 8 | * Licensed to the Apache Software Foundation (ASF) under one or more 9 | * contributor license agreements. See the NOTICE file distributed with 10 | * this work for additional information regarding copyright ownership. 11 | * The ASF licenses this file to You under the Apache License, Version 2.0 12 | * (the "License"); you may not use this file except in compliance with 13 | * the License. You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, software 18 | * distributed under the License is distributed on an "AS IS" BASIS, 19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | * See the License for the specific language governing permissions and 21 | * limitations under the License. 22 | * ==================================================================== 23 | * 24 | * This software consists of voluntary contributions made by many 25 | * individuals on behalf of the Apache Software Foundation. For more 26 | * information on the Apache Software Foundation, please see 27 | * . 28 | */ 29 | 30 | package org.apache.commons.httpclient.contrib.ssl; 31 | 32 | /** 33 | *

34 | * Signals fatal error in initialization of {@link AuthSSLProtocolSocketFactory}. 35 | *

36 | * 37 | * @author Oleg Kalnichevski 38 | * 39 | *

40 | * DISCLAIMER: HttpClient developers DO NOT actively support this component. 41 | * The component is provided as a reference material, which may be inappropriate 42 | * for use without additional customization. 43 | *

44 | */ 45 | 46 | public class AuthSSLInitializationError extends Error { 47 | 48 | /** 49 | * Creates a new AuthSSLInitializationError. 50 | */ 51 | public AuthSSLInitializationError() { 52 | super(); 53 | } 54 | 55 | /** 56 | * Creates a new AuthSSLInitializationError with the specified message. 57 | * 58 | * @param message error message 59 | */ 60 | public AuthSSLInitializationError(String message) { 61 | super(message); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/apache/commons/httpclient/contrib/ssl/HostConfigurationWithHostFactory.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.httpclient.contrib.ssl; 2 | 3 | import org.apache.commons.httpclient.HostConfiguration; 4 | import org.apache.commons.httpclient.HttpURL; 5 | import org.apache.commons.httpclient.protocol.Protocol; 6 | 7 | /** 8 | * A kind of HostConfiguration that gets its Host from a factory. This is useful 9 | * for integrating a specialized Protocol or SocketFactory; for example, a 10 | * SecureSocketFactory that authenticates via SSL. Use 11 | * HttpClient.setHostConfiguration to install a HostConfigurationWithHostFactory 12 | * that contains the specialized HostFactory, Protocol or SocketFactory. 13 | *

14 | * An alternative is to use Protocol.registerProtocol to register a specialized 15 | * Protocol. But that has drawbacks: it makes it hard to integrate modules (e.g. 16 | * web applications in a servlet container) with different strategies, because 17 | * they share the specialized Protocol (Protocol.PROTOCOLS is static). And it 18 | * can't support different Protocols for different hosts or ports (since the 19 | * host and port aren't parameters to Protocol.getProtocol). 20 | * 21 | * @author John Kristian 22 | */ 23 | class HostConfigurationWithHostFactory extends HostConfiguration 24 | { 25 | public HostConfigurationWithHostFactory(HttpHostFactory factory) 26 | { 27 | this.factory = factory; 28 | } 29 | 30 | private HostConfigurationWithHostFactory(HostConfigurationWithHostFactory that) 31 | { 32 | super(that); 33 | this.factory = that.factory; 34 | } 35 | 36 | private final HttpHostFactory factory; 37 | 38 | public Object clone() 39 | { 40 | return new HostConfigurationWithHostFactory(this); 41 | } 42 | 43 | private static final String DEFAULT_SCHEME = new String(HttpURL.DEFAULT_SCHEME); 44 | 45 | public void setHost(String host) 46 | { 47 | setHost(host, Protocol.getProtocol(DEFAULT_SCHEME).getDefaultPort()); 48 | } 49 | 50 | public void setHost(final String host, int port) 51 | { 52 | setHost(host, port, DEFAULT_SCHEME); 53 | } 54 | 55 | public synchronized void setHost(String host, int port, String scheme) 56 | { 57 | setHost(factory.getHost(this, scheme, host, port)); 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/apache/commons/httpclient/contrib/ssl/HttpHostFactory.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.httpclient.contrib.ssl; 2 | 3 | import org.apache.commons.httpclient.HostConfiguration; 4 | import org.apache.commons.httpclient.HttpHost; 5 | import org.apache.commons.httpclient.HttpsURL; 6 | import org.apache.commons.httpclient.protocol.Protocol; 7 | import org.apache.commons.httpclient.protocol.ProtocolSocketFactory; 8 | 9 | /** A source of HttpHosts. */ 10 | public class HttpHostFactory 11 | { 12 | /** The default factory. */ 13 | public static final HttpHostFactory DEFAULT = new HttpHostFactory(null, // httpProtocol 14 | new Protocol(new String(HttpsURL.DEFAULT_SCHEME), 15 | (ProtocolSocketFactory) new EasySSLProtocolSocketFactory(), 16 | HttpsURL.DEFAULT_PORT)); 17 | 18 | public HttpHostFactory(Protocol httpProtocol, Protocol httpsProtocol) 19 | { 20 | this.httpProtocol = httpProtocol; 21 | this.httpsProtocol = httpsProtocol; 22 | } 23 | 24 | protected final Protocol httpProtocol; 25 | 26 | protected final Protocol httpsProtocol; 27 | 28 | /** Get a host for the given parameters. This method need not be thread-safe. */ 29 | public HttpHost getHost(HostConfiguration old, String scheme, String host, int port) 30 | { 31 | return new HttpHost(host, port, getProtocol(old, scheme, host, port)); 32 | } 33 | 34 | /** 35 | * Get a Protocol for the given parameters. The default implementation 36 | * selects a protocol based only on the scheme. Subclasses can do fancier 37 | * things, such as select SSL parameters based on the host or port. This 38 | * method must not return null. 39 | */ 40 | protected Protocol getProtocol(HostConfiguration old, String scheme, String host, int port) 41 | { 42 | final Protocol oldProtocol = old.getProtocol(); 43 | if (oldProtocol != null) { 44 | final String oldScheme = oldProtocol.getScheme(); 45 | if (oldScheme == scheme || (oldScheme != null && oldScheme.equalsIgnoreCase(scheme))) { 46 | // The old protocol has the desired scheme. 47 | return oldProtocol; // Retain it. 48 | } 49 | } 50 | Protocol newProtocol = (scheme != null && scheme.toLowerCase().endsWith("s")) ? httpsProtocol 51 | : httpProtocol; 52 | if (newProtocol == null) { 53 | newProtocol = Protocol.getProtocol(scheme); 54 | } 55 | return newProtocol; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/eclipse/swt/snippets/Snippet163.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2000, 2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM Corporation - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.swt.snippets; 12 | 13 | /* 14 | * Setting the font style, foreground and background colors of StyledText 15 | * 16 | * For a list of all SWT example snippets see 17 | * http://www.eclipse.org/swt/snippets/ 18 | */ 19 | import org.eclipse.swt.*; 20 | import org.eclipse.swt.custom.*; 21 | import org.eclipse.swt.layout.*; 22 | import org.eclipse.swt.widgets.*; 23 | 24 | public class Snippet163 { 25 | 26 | public static void main(String[] args) { 27 | Display display = new Display(); 28 | Shell shell = new Shell(display); 29 | shell.setLayout(new FillLayout()); 30 | StyledText text = new StyledText (shell, SWT.BORDER); 31 | text.setText("0123456789 ABCDEFGHIJKLM NOPQRSTUVWXYZ"); 32 | // make 0123456789 appear bold 33 | StyleRange style1 = new StyleRange(); 34 | style1.start = 0; 35 | style1.length = 10; 36 | style1.fontStyle = SWT.BOLD; 37 | text.setStyleRange(style1); 38 | // make ABCDEFGHIJKLM have a red font 39 | StyleRange style2 = new StyleRange(); 40 | style2.start = 11; 41 | style2.length = 13; 42 | style2.foreground = display.getSystemColor(SWT.COLOR_RED); 43 | text.setStyleRange(style2); 44 | // make NOPQRSTUVWXYZ have a blue background 45 | StyleRange style3 = new StyleRange(); 46 | style3.start = 25; 47 | style3.length = 13; 48 | style3.background = display.getSystemColor(SWT.COLOR_BLUE); 49 | text.setStyleRange(style3); 50 | 51 | shell.pack(); 52 | shell.open(); 53 | while (!shell.isDisposed()) { 54 | if (!display.readAndDispatch()) 55 | display.sleep(); 56 | } 57 | display.dispose(); 58 | } 59 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/eclipse/swt/snippets/Snippet332.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2000, 2009 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM Corporation - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.swt.snippets; 12 | 13 | /* 14 | * SWT StyledText snippet: using BidiSegmentEvent#segmentsChars to implement custom bidi segments 15 | * 16 | * For a list of all SWT example snippets see 17 | * http://www.eclipse.org/swt/snippets/ 18 | * 19 | * @since 3.6 20 | */ 21 | import org.eclipse.swt.*; 22 | import org.eclipse.swt.layout.*; 23 | import org.eclipse.swt.widgets.*; 24 | import org.eclipse.swt.custom.*; 25 | import org.eclipse.swt.graphics.*; 26 | 27 | public class Snippet332 { 28 | 29 | public static void main(String [] args) { 30 | final Display display = new Display(); 31 | Shell shell = new Shell(display); 32 | FillLayout layout = new FillLayout(); 33 | layout.marginHeight = layout.marginWidth = 10; 34 | shell.setLayout(layout); 35 | StyledText text = new StyledText(shell, SWT.MULTI | SWT.BORDER); 36 | final String segment = "Eclipse"; 37 | String string = "Force RTL direction on this segment \""+segment+"\"."; 38 | text.setText(string); 39 | int[] segments = {string.indexOf(segment), segment.length()}; 40 | StyleRange[] ranges = {new StyleRange(0, 0, display.getSystemColor(SWT.COLOR_RED), null)}; 41 | text.setStyleRanges(segments, ranges); 42 | text.setFont(new Font(display, "Tahoma", 16, 0)); 43 | text.addBidiSegmentListener(new BidiSegmentListener() { 44 | public void lineGetSegments(BidiSegmentEvent event) { 45 | String string = event.lineText; 46 | int start = string.indexOf(segment); 47 | event.segments = new int []{start, start + segment.length()}; 48 | // event.data = new char[] {'\u202e', '\u202C'}; 49 | } 50 | }); 51 | shell.setSize(500, 200); 52 | shell.open(); 53 | while (!shell.isDisposed()) { 54 | if (!display.readAndDispatch()) display.sleep(); 55 | } 56 | display.dispose(); 57 | } 58 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/json/me/JSONException.java: -------------------------------------------------------------------------------- 1 | package org.json.me; 2 | 3 | /** 4 | * The JSONException is thrown by the JSON.org classes then things are amiss. 5 | * @author JSON.org 6 | * @version 2 7 | */ 8 | public class JSONException extends Exception { 9 | private Throwable cause; 10 | 11 | /** 12 | * Constructs a JSONException with an explanatory message. 13 | * @param message Detail about the reason for the exception. 14 | */ 15 | public JSONException(String message) { 16 | super(message); 17 | } 18 | 19 | public JSONException(Throwable t) { 20 | super(t.getMessage()); 21 | this.cause = t; 22 | } 23 | 24 | public Throwable getCause() { 25 | return this.cause; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/json/me/JSONString.java: -------------------------------------------------------------------------------- 1 | package org.json.me; 2 | /** 3 | * The JSONString interface allows a toJSONString() 4 | * method so that a class can change the behavior of 5 | * JSONObject.toString(), JSONArray.toString(), 6 | * and JSONWriter.value(Object). The 7 | * toJSONString method will be used instead of the default behavior 8 | * of using the Object's toString() method and quoting the result. 9 | */ 10 | public interface JSONString { 11 | /** 12 | * The toJSONString method allows a class to produce its own JSON 13 | * serialization. 14 | * 15 | * @return A strictly syntactically correct JSON text. 16 | */ 17 | public String toJSONString(); 18 | } 19 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/json/me/SWTHelloWorld.java: -------------------------------------------------------------------------------- 1 | package org.json.me; 2 | 3 | import org.eclipse.swt.SWT; 4 | import org.eclipse.swt.widgets.Display; 5 | import org.eclipse.swt.widgets.Shell; 6 | import org.eclipse.swt.widgets.Text; 7 | 8 | public class SWTHelloWorld { 9 | 10 | public static void main( String[] args){ 11 | Display display = new Display(); 12 | Shell shell = new Shell(display); 13 | 14 | // Text helloWorldTest = new Text(shell, SWT.NONE); 15 | // helloWorldTest.setText("Hello World SWT"); 16 | // helloWorldTest.pack(); 17 | 18 | Ch5CompletionEditor ch5CompletionEditor = new Ch5CompletionEditor(shell); 19 | 20 | 21 | shell.pack(); 22 | shell.open(); 23 | while (!shell.isDisposed()) { 24 | if (!display.readAndDispatch()) 25 | display.sleep(); 26 | } 27 | display.dispose(); 28 | } 29 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/json/me/SWTStyledTextExample.java: -------------------------------------------------------------------------------- 1 | package org.json.me; 2 | 3 | 4 | import org.eclipse.jface.text.source.SourceViewer; 5 | import org.eclipse.swt.SWT; 6 | import org.eclipse.swt.custom.StyledText; 7 | import org.eclipse.swt.layout.FillLayout; 8 | import org.eclipse.swt.widgets.Composite; 9 | import org.eclipse.swt.widgets.Display; 10 | import org.eclipse.swt.widgets.Shell; 11 | import org.roussev.http4e.editor.xml.XMLConfiguration; 12 | import org.roussev.http4e.httpclient.core.client.view.assist.DocumentUtils; 13 | import org.roussev.http4e.httpclient.core.misc.ColorManagerAdaptor; 14 | import org.roussev.http4e.httpclient.core.util.ResourceUtils; 15 | 16 | public class SWTStyledTextExample { 17 | 18 | private static StyledText buildEditorText( Composite parent){ 19 | final SourceViewer sourceViewer = new SourceViewer(parent, null, SWT.MULTI | SWT.V_SCROLL | SWT.WRAP); 20 | 21 | final XMLConfiguration sourceConf = new XMLConfiguration(new ColorManagerAdaptor(ResourceUtils.getResourceCache())); 22 | sourceViewer.configure(sourceConf); 23 | sourceViewer.setDocument(DocumentUtils.createDocument2()); 24 | 25 | return sourceViewer.getTextWidget(); 26 | } 27 | 28 | 29 | public static void main( String[] args){ 30 | 31 | Shell shell = new Shell(); 32 | shell.setLayout(new FillLayout()); 33 | shell.setSize(200, 100); 34 | Display display = shell.getDisplay(); 35 | 36 | // JsonTextEditor editor = new JsonTextEditor(); 37 | // editor.gete 38 | 39 | StyledText styledText = buildEditorText(shell); 40 | 41 | shell.open(); 42 | 43 | while (!shell.isDisposed()) { 44 | if (!display.readAndDispatch()) { 45 | display.sleep(); 46 | } 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/json/me/StringWriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 Sun Microsystems, Inc. 3 | */ 4 | 5 | package org.json.me; 6 | 7 | import java.io.IOException; 8 | import java.io.Writer; 9 | 10 | /** 11 | * A simple StringBuffer-based implementation of StringWriter 12 | */ 13 | public class StringWriter extends Writer { 14 | 15 | final private StringBuffer buf; 16 | 17 | public StringWriter() { 18 | super(); 19 | buf = new StringBuffer(); 20 | } 21 | 22 | public StringWriter(int initialSize) { 23 | super(); 24 | buf = new StringBuffer(initialSize); 25 | } 26 | 27 | public void write(char[] cbuf, int off, int len) throws IOException { 28 | buf.append(cbuf, off, len); 29 | } 30 | 31 | public void write(String str) throws IOException { 32 | buf.append(str); 33 | } 34 | 35 | public void write(String str, int off, int len) throws IOException { 36 | buf.append(str.substring(off, len)); 37 | } 38 | 39 | public void flush() throws IOException { 40 | } 41 | 42 | public void close() throws IOException { 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/json/me/test/SyntaxData.java: -------------------------------------------------------------------------------- 1 | package org.json.me.test; 2 | 3 | import java.util.Collection; 4 | 5 | /** 6 | * This class contains information for syntax coloring and styling for an 7 | * extension 8 | */ 9 | public class SyntaxData { 10 | 11 | public String extension; 12 | public Collection keywords; 13 | public String punctuation; 14 | public String comment; 15 | public String multiLineCommentStart; 16 | public String multiLineCommentEnd; 17 | 18 | 19 | public SyntaxData( String extension) { 20 | this.extension = extension; 21 | } 22 | 23 | 24 | public String getExtension(){ 25 | return extension; 26 | } 27 | 28 | 29 | public String getComment(){ 30 | return comment; 31 | } 32 | 33 | 34 | public void setComment( String comment){ 35 | this.comment = comment; 36 | } 37 | 38 | 39 | public Collection getKeywords(){ 40 | return keywords; 41 | } 42 | 43 | 44 | public void setKeywords( Collection keywords){ 45 | this.keywords = keywords; 46 | } 47 | 48 | 49 | public String getMultiLineCommentEnd(){ 50 | return multiLineCommentEnd; 51 | } 52 | 53 | 54 | public void setMultiLineCommentEnd( String multiLineCommentEnd){ 55 | this.multiLineCommentEnd = multiLineCommentEnd; 56 | } 57 | 58 | 59 | public String getMultiLineCommentStart(){ 60 | return multiLineCommentStart; 61 | } 62 | 63 | 64 | public void setMultiLineCommentStart( String multiLineCommentStart){ 65 | this.multiLineCommentStart = multiLineCommentStart; 66 | } 67 | 68 | 69 | public String getPunctuation(){ 70 | return punctuation; 71 | } 72 | 73 | 74 | public void setPunctuation( String punctuation){ 75 | this.punctuation = punctuation; 76 | } 77 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/json/me/test/SyntaxManager2.java: -------------------------------------------------------------------------------- 1 | package org.json.me.test; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Collection; 5 | import java.util.Hashtable; 6 | import java.util.Map; 7 | import java.util.MissingResourceException; 8 | import java.util.ResourceBundle; 9 | import java.util.StringTokenizer; 10 | 11 | 12 | /** 13 | * This class manages the syntax coloring and styling data 14 | */ 15 | class SyntaxManager2 { 16 | // Lazy cache of SyntaxData objects 17 | private static Map data = new Hashtable(); 18 | 19 | /** 20 | * Gets the syntax data for an extension 21 | */ 22 | public static synchronized SyntaxData getSyntaxData(String extension) { 23 | // Check in cache 24 | SyntaxData sd = (SyntaxData) data.get(extension); 25 | if (sd == null) { 26 | // Not in cache; load it and put in cache 27 | sd = loadSyntaxData(extension); 28 | if (sd != null) data.put(sd.getExtension(), sd); 29 | } 30 | return sd; 31 | } 32 | 33 | /** 34 | * Loads the syntax data for an extension 35 | * 36 | * @param extension the extension to load 37 | * @return SyntaxData 38 | */ 39 | private static SyntaxData loadSyntaxData(String extension) { 40 | SyntaxData sd = null; 41 | try { 42 | ResourceBundle rb = ResourceBundle.getBundle("examples.ch11." + extension); 43 | sd = new SyntaxData(extension); 44 | sd.setComment(rb.getString("comment")); 45 | sd.setMultiLineCommentStart(rb.getString("multilinecommentstart")); 46 | sd.setMultiLineCommentEnd(rb.getString("multilinecommentend")); 47 | 48 | // Load the keywords 49 | Collection keywords = new ArrayList(); 50 | for (StringTokenizer st = new StringTokenizer(rb.getString("keywords"), " "); st 51 | .hasMoreTokens();) { 52 | keywords.add(st.nextToken()); 53 | } 54 | sd.setKeywords(keywords); 55 | 56 | // Load the punctuation 57 | sd.setPunctuation(rb.getString("punctuation")); 58 | } catch (MissingResourceException e) { 59 | // Ignore 60 | } 61 | return sd; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/json/me/test/Uutt.java: -------------------------------------------------------------------------------- 1 | package org.json.me.test; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.FileReader; 5 | 6 | public class Uutt { 7 | 8 | public static String readFileAsString( String filePath) throws java.io.IOException{ 9 | StringBuffer fileData = new StringBuffer(1000); 10 | BufferedReader reader = new BufferedReader(new FileReader(filePath)); 11 | char[] buf = new char[1024]; 12 | int numRead = 0; 13 | while ((numRead = reader.read(buf)) != -1) { 14 | String readData = String.valueOf(buf, 0, numRead); 15 | fileData.append(readData); 16 | buf = new char[1024]; 17 | } 18 | reader.close(); 19 | return fileData.toString(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/crypt/CryptConstants.java: -------------------------------------------------------------------------------- 1 | package org.roussev.http4e.crypt; 2 | 3 | public interface CryptConstants { 4 | 5 | String UTF8 = "UTF8"; 6 | 7 | // 8-bytes Salt 8 | byte[] SALT = { 9 | (byte)0xA9, (byte)0x9B, (byte)0xC8, (byte)0x32, 10 | (byte)0x56, (byte)0x34, (byte)0xE3, (byte)0x03 11 | }; 12 | 13 | int ITERATION_COUNT = 19; 14 | 15 | String SECRET_KEY_ALGORITHM = "PBEWithMD5AndDES"; 16 | 17 | String HMAC_ALGORITHM = "HmacSHA1"; 18 | 19 | String MESSAGE_DIGEST_ALGORITHM = "SHA1"; 20 | 21 | String PUBLIC_KEY_ALGORITHM = "RSA"; //"DSA", "DH", "RSA" 22 | 23 | } 24 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/crypt/Errors.java: -------------------------------------------------------------------------------- 1 | package org.roussev.http4e.crypt; 2 | 3 | public class Errors extends Exception { 4 | 5 | public final static int 6 | SUCCESS = 0, 7 | KEY_TABLE_READ = 1, 8 | TOKEN_READ = 2, 9 | EMAIL_EMPTY = 3, 10 | UNSUPPORTED_ENCODING = 4, 11 | MAJOR_MINOR_NOT_SUPPORTED = 5, 12 | EMAIL_DOESNOT_MATCH = 6, 13 | UNKNOWN = 100 14 | ; 15 | 16 | private int code = SUCCESS; 17 | 18 | public Errors(int code){ 19 | this.code = code; 20 | } 21 | 22 | public Errors(int code, String msg){ 23 | super(msg); 24 | this.code = code; 25 | } 26 | 27 | public Errors(int code, Throwable throwable){ 28 | super(throwable); 29 | this.code = code; 30 | } 31 | 32 | public int getCode(){ 33 | return code; 34 | } 35 | 36 | public void setCode( int code){ 37 | this.code = code; 38 | } 39 | 40 | 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/crypt/MiscUtils.java: -------------------------------------------------------------------------------- 1 | package org.roussev.http4e.crypt; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | 6 | public class MiscUtils { 7 | 8 | public static byte[] streamToBytes( InputStream in) throws IOException{ 9 | byte[] bytes = new byte[in.available()]; 10 | in.read(bytes); 11 | in.close(); 12 | return bytes; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/crypt/depricated/Qwe.java: -------------------------------------------------------------------------------- 1 | package org.roussev.http4e.crypt.depricated; 2 | 3 | 4 | public class Qwe { 5 | 6 | public static void main( String[] args) throws Exception{ 7 | 8 | String property = "java.io.tmpdir"; 9 | String tempDir = System.getProperty(property); 10 | 11 | System.out.println(tempDir); 12 | 13 | // // Display display = new Display (); 14 | // // Shell shell = new Shell (display); 15 | // // StyledText text = new StyledText (shell, SWT.SINGLE | SWT.BORDER); 16 | // // text.setText ( "123-\u0067\u0035\u039e\u322F\u5193" ); 17 | // // System.out.println ( "123-\u0067\u0035\u039e\u322F\u5193" ); 18 | // // text.pack (); 19 | // // shell.pack (); 20 | // // shell.open (); 21 | // // while (!shell.isDisposed ()) { 22 | // // if (!display.readAndDispatch ()) display.sleep (); 23 | // // } 24 | // // display.dispose (); 25 | // FileInputStream fis = new FileInputStream("c:/utf.txt"); 26 | // // byte[] data = new byte[fis.available()]; 27 | // // fis.read(data); 28 | // // ByteArrayInputStream bys = new ByteArrayInputStream(data); 29 | // InputStreamReader inR = new InputStreamReader(fis, "UTF8"); 30 | // // String line = "qqq=ee"; 31 | // // String[] params = line.split("="); 32 | // // System.out.println(params); 33 | // 34 | // BufferedReader buf = new BufferedReader(inR); 35 | // String line; 36 | // StringBuilder respBuff = new StringBuilder(); 37 | // while ((line = buf.readLine()) != null) { 38 | // respBuff.append(line); 39 | // respBuff.append("\r\n"); 40 | // String[] params = line.split("\\:="); 41 | // System.out.println(params); 42 | // Properties p = null; 43 | // InputStream in = null; 44 | //// InputStreamReader inR = null; 45 | // p.load(in); 46 | // } 47 | // System.out.println(respBuff); 48 | 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/editor/xml/ColorManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.editor.xml; 17 | 18 | import org.eclipse.swt.graphics.Color; 19 | import org.eclipse.swt.graphics.RGB; 20 | 21 | /** 22 | * 23 | * @author Atanas Roussev (http://nextinterfaces.com) 24 | */ 25 | public interface ColorManager { 26 | 27 | void dispose(); 28 | 29 | Color getColor(RGB rgb); 30 | 31 | } 32 | 33 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/editor/xml/IXMLColorConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.editor.xml; 17 | 18 | import org.eclipse.swt.graphics.RGB; 19 | 20 | /** 21 | * 22 | * @author Atanas Roussev (http://nextinterfaces.com) 23 | */ 24 | public interface IXMLColorConstants { 25 | 26 | RGB XML_COMMENT = new RGB(128, 0, 0); 27 | RGB PROC_INSTR = new RGB(200, 20, 200); 28 | RGB DOCTYPE = new RGB(0, 150, 150); 29 | RGB STRING = new RGB(0, 128, 0); 30 | RGB DEFAULT = new RGB(0, 0, 0); 31 | RGB TAG = new RGB(0, 0, 128); 32 | 33 | // enhancements 34 | RGB ESCAPED_CHAR = new RGB(128, 128, 0); 35 | RGB CDATA = new RGB(0, 128, 128); 36 | RGB CDATA_TEXT = new RGB(255, 0, 0); 37 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/editor/xml/XMLWhitespaceDetector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.editor.xml; 17 | 18 | import org.eclipse.jface.text.rules.IWhitespaceDetector; 19 | 20 | /** 21 | * @author Atanas Roussev (http://nextinterfaces.com) 22 | */ 23 | public class XMLWhitespaceDetector implements IWhitespaceDetector { 24 | 25 | public boolean isWhitespace(char c) { 26 | return (c == ' ' || c == '\t' || c == '\n' || c == '\r'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/editor/xml/format/DefaultFormattingStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.editor.xml.format; 17 | 18 | import org.eclipse.jface.text.formatter.IFormattingStrategy; 19 | 20 | /** 21 | * 22 | * @author Phil Zoio 23 | */ 24 | public class DefaultFormattingStrategy implements IFormattingStrategy { 25 | 26 | protected static final String lineSeparator = System.getProperty("line.separator"); 27 | 28 | 29 | public DefaultFormattingStrategy() { 30 | super(); 31 | } 32 | 33 | 34 | public void formatterStarts( String initialIndentation){ 35 | } 36 | 37 | 38 | public String format( String content, boolean isLineStart, String indentation, int[] positions){ 39 | return ""; 40 | } 41 | 42 | 43 | public void formatterStops(){ 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/editor/xml/format/DocTypeFormattingStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Created on Oct 11, 2004 3 | */ 4 | package org.roussev.http4e.editor.xml.format; 5 | 6 | /** 7 | * 8 | * @author Phil Zoio 9 | */ 10 | public class DocTypeFormattingStrategy extends DefaultFormattingStrategy { 11 | 12 | public String format( String content, boolean isLineStart, String indentation, int[] positions){ 13 | return lineSeparator + content; 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/editor/xml/format/PIFormattingStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.editor.xml.format; 17 | 18 | /** 19 | * 20 | * @author Phil Zoio 21 | */ 22 | public class PIFormattingStrategy extends DefaultFormattingStrategy { 23 | 24 | public String format( String content, boolean isLineStart, String indentation, int[] positions){ 25 | return content; 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/editor/xml/format/TextFormattingStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.editor.xml.format; 17 | 18 | /** 19 | * 20 | * @author Phil Zoio 21 | */ 22 | public class TextFormattingStrategy extends DefaultFormattingStrategy { 23 | 24 | private static final String lineSeparator = System.getProperty("line.separator"); 25 | 26 | 27 | public TextFormattingStrategy() { 28 | super(); 29 | } 30 | 31 | 32 | public String format( String content, boolean isLineStart, String indentation, int[] positions){ 33 | if (indentation.length() == 0) 34 | return content; 35 | return lineSeparator + content.trim() + lineSeparator + indentation; 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/editor/xml/rules/EscapedCharRule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.editor.xml.rules; 17 | 18 | import org.eclipse.jface.text.rules.ICharacterScanner; 19 | import org.eclipse.jface.text.rules.IRule; 20 | import org.eclipse.jface.text.rules.IToken; 21 | import org.eclipse.jface.text.rules.Token; 22 | 23 | public class EscapedCharRule implements IRule { 24 | 25 | IToken fToken; 26 | StringBuilder buffer = new StringBuilder(); 27 | 28 | 29 | public EscapedCharRule( IToken token) { 30 | super(); 31 | this.fToken = token; 32 | } 33 | 34 | 35 | /* 36 | * @see IRule#evaluate(ICharacterScanner) 37 | */ 38 | public IToken evaluate( ICharacterScanner scanner){ 39 | 40 | buffer.setLength(0); 41 | 42 | int c = read(scanner); 43 | if (c == '&') { 44 | 45 | int i = 0; 46 | do { 47 | c = read(scanner); 48 | i++; 49 | 50 | if (c == '<' || c == ']') { 51 | for (int j = i - 1; j > 0; j--) 52 | scanner.unread(); 53 | return Token.UNDEFINED; 54 | } 55 | } while (c != ';'); 56 | return fToken; 57 | } 58 | 59 | scanner.unread(); 60 | return Token.UNDEFINED; 61 | } 62 | 63 | 64 | private int read( ICharacterScanner scanner){ 65 | int c = scanner.read(); 66 | buffer.append((char) c); 67 | return c; 68 | } 69 | 70 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/editor/xml/rules/NonMatchingRule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.editor.xml.rules; 17 | 18 | import org.eclipse.jface.text.rules.ICharacterScanner; 19 | import org.eclipse.jface.text.rules.IPredicateRule; 20 | import org.eclipse.jface.text.rules.IToken; 21 | import org.eclipse.jface.text.rules.Token; 22 | 23 | /** 24 | * 25 | * @author Phil Zoio 26 | */ 27 | public class NonMatchingRule implements IPredicateRule { 28 | 29 | public NonMatchingRule() { 30 | super(); 31 | } 32 | 33 | 34 | public IToken getSuccessToken(){ 35 | return Token.UNDEFINED; 36 | } 37 | 38 | 39 | public IToken evaluate( ICharacterScanner scanner, boolean resume){ 40 | return Token.UNDEFINED; 41 | } 42 | 43 | 44 | public IToken evaluate( ICharacterScanner scanner){ 45 | return Token.UNDEFINED; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/editor/xml/rules/StartTagRule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.editor.xml.rules; 17 | 18 | import org.eclipse.jface.text.rules.ICharacterScanner; 19 | import org.eclipse.jface.text.rules.IToken; 20 | import org.eclipse.jface.text.rules.MultiLineRule; 21 | 22 | /** 23 | * 24 | * @author Phil Zoio 25 | */ 26 | public class StartTagRule extends MultiLineRule { 27 | 28 | public StartTagRule( IToken token) { 29 | this(token, false); 30 | } 31 | 32 | 33 | protected StartTagRule( IToken token, boolean endAsWell) { 34 | super("<", endAsWell ? "/>" : ">", token); 35 | } 36 | 37 | 38 | protected boolean sequenceDetected( ICharacterScanner scanner, char[] sequence, boolean eofAllowed){ 39 | int c = scanner.read(); 40 | if (sequence[0] == '<') { 41 | if (c == '?') { 42 | // processing instruction - abort 43 | scanner.unread(); 44 | return false; 45 | } 46 | if (c == '!') { 47 | scanner.unread(); 48 | // comment - abort 49 | return false; 50 | } 51 | } else if (sequence[0] == '>') { 52 | scanner.unread(); 53 | } 54 | return super.sequenceDetected(scanner, sequence, eofAllowed); 55 | } 56 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/editor/xml/scanners/CDataScanner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.editor.xml.scanners; 17 | 18 | import org.eclipse.jface.text.TextAttribute; 19 | import org.eclipse.jface.text.rules.IRule; 20 | import org.eclipse.jface.text.rules.IToken; 21 | import org.eclipse.jface.text.rules.RuleBasedScanner; 22 | import org.eclipse.jface.text.rules.Token; 23 | import org.roussev.http4e.editor.xml.ColorManager; 24 | import org.roussev.http4e.editor.xml.IXMLColorConstants; 25 | import org.roussev.http4e.editor.xml.rules.CDataRule; 26 | 27 | /** 28 | * @author Atanas Roussev (http://nextinterfaces.com) 29 | */ 30 | public class CDataScanner extends RuleBasedScanner { 31 | 32 | public IToken ESCAPED_CHAR; 33 | public IToken CDATA; 34 | 35 | 36 | public CDataScanner( ColorManager colorManager) { 37 | 38 | CDATA = new Token(new TextAttribute(colorManager.getColor(IXMLColorConstants.CDATA))); 39 | 40 | IRule[] rules = new IRule[2]; 41 | 42 | // Add rule to pick up start of c section 43 | rules[0] = new CDataRule(CDATA, true); 44 | // Add a rule to pick up end of CDATA sections 45 | rules[1] = new CDataRule(CDATA, false); 46 | 47 | setRules(rules); 48 | } 49 | 50 | 51 | public IToken nextToken(){ 52 | return super.nextToken(); 53 | } 54 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/editor/xml/scanners/XMLScanner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.editor.xml.scanners; 17 | 18 | import org.eclipse.jface.text.TextAttribute; 19 | import org.eclipse.jface.text.rules.IRule; 20 | import org.eclipse.jface.text.rules.IToken; 21 | import org.eclipse.jface.text.rules.MultiLineRule; 22 | import org.eclipse.jface.text.rules.RuleBasedScanner; 23 | import org.eclipse.jface.text.rules.Token; 24 | import org.eclipse.jface.text.rules.WhitespaceRule; 25 | import org.roussev.http4e.editor.xml.ColorManager; 26 | import org.roussev.http4e.editor.xml.IXMLColorConstants; 27 | import org.roussev.http4e.editor.xml.XMLWhitespaceDetector; 28 | 29 | 30 | /** 31 | * @author Atanas Roussev (http://nextinterfaces.com) 32 | */ 33 | public class XMLScanner extends RuleBasedScanner { 34 | 35 | public XMLScanner( ColorManager manager) { 36 | IToken procInstr = new Token(new TextAttribute(manager.getColor(IXMLColorConstants.PROC_INSTR))); 37 | IToken docType = new Token(new TextAttribute(manager.getColor(IXMLColorConstants.DOCTYPE))); 38 | 39 | IRule[] rules = new IRule[3]; 40 | // Add rule for processing instructions and doctype 41 | rules[0] = new MultiLineRule("", procInstr); 42 | rules[1] = new MultiLineRule("", docType); 43 | // Add generic whitespace rule. 44 | rules[2] = new WhitespaceRule(new XMLWhitespaceDetector()); 45 | 46 | setRules(rules); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/editor/xml/scanners/XMLTagScanner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.editor.xml.scanners; 17 | 18 | import org.eclipse.jface.text.TextAttribute; 19 | import org.eclipse.jface.text.rules.IRule; 20 | import org.eclipse.jface.text.rules.IToken; 21 | import org.eclipse.jface.text.rules.RuleBasedScanner; 22 | import org.eclipse.jface.text.rules.SingleLineRule; 23 | import org.eclipse.jface.text.rules.Token; 24 | import org.eclipse.jface.text.rules.WhitespaceRule; 25 | import org.roussev.http4e.editor.xml.ColorManager; 26 | import org.roussev.http4e.editor.xml.IXMLColorConstants; 27 | import org.roussev.http4e.editor.xml.XMLWhitespaceDetector; 28 | 29 | 30 | /** 31 | * @author Atanas Roussev (http://nextinterfaces.com) 32 | */ 33 | public class XMLTagScanner extends RuleBasedScanner { 34 | 35 | public XMLTagScanner( ColorManager manager) { 36 | IToken string = new Token(new TextAttribute(manager.getColor(IXMLColorConstants.STRING))); 37 | 38 | IRule[] rules = new IRule[3]; 39 | 40 | // Add rule for double quotes 41 | rules[0] = new SingleLineRule("\"", "\"", string, '\\'); 42 | // Add a rule for single quotes 43 | rules[1] = new SingleLineRule("'", "'", string, '\\'); 44 | // Add generic whitespace rule. 45 | rules[2] = new WhitespaceRule(new XMLWhitespaceDetector()); 46 | 47 | setRules(rules); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/editor/xml/xmlattribs/XMLAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.editor.xml.xmlattribs; 17 | 18 | /** 19 | * @author Atanas Roussev (http://nextinterfaces.com) 20 | */ 21 | public class XMLAttribute { 22 | 23 | private String name; 24 | private String value; 25 | 26 | 27 | public XMLAttribute( String name) { 28 | super(); 29 | this.name = name; 30 | } 31 | 32 | 33 | public XMLAttribute( String name, String value) { 34 | super(); 35 | this.name = name; 36 | this.value = value; 37 | } 38 | 39 | 40 | public String getName(){ 41 | return name; 42 | } 43 | 44 | 45 | public String getValue(){ 46 | return value; 47 | } 48 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/editor/xml/xmlattribs/XMLValidationError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.editor.xml.xmlattribs; 17 | 18 | /** 19 | * @author Atanas Roussev (http://nextinterfaces.com) 20 | */ 21 | public class XMLValidationError { 22 | 23 | private String errorMessage; 24 | private int lineNumber; 25 | private int columnNumber; 26 | 27 | 28 | public String getErrorMessage(){ 29 | return errorMessage; 30 | } 31 | 32 | 33 | public void setErrorMessage( String errorMessage){ 34 | this.errorMessage = errorMessage; 35 | } 36 | 37 | 38 | public int getLineNumber(){ 39 | return lineNumber; 40 | } 41 | 42 | 43 | public void setLineNumber( int lineNumber){ 44 | this.lineNumber = lineNumber; 45 | } 46 | 47 | 48 | public int getColumnNumber(){ 49 | return columnNumber; 50 | } 51 | 52 | 53 | public void setColumnNumber( int columnNumber){ 54 | this.columnNumber = columnNumber; 55 | } 56 | 57 | 58 | public String toString(){ 59 | StringBuilder buf = new StringBuilder(); 60 | buf.append("Error on ").append(" line ").append(lineNumber).append(", column ").append(columnNumber).append(": ").append(errorMessage); 61 | return buf.toString(); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/CoreContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core; 17 | 18 | import java.io.File; 19 | import java.util.HashMap; 20 | import java.util.Map; 21 | 22 | import org.eclipse.swt.widgets.Shell; 23 | 24 | /** 25 | * @author Atanas Roussev (http://nextinterfaces.com) 26 | */ 27 | @SuppressWarnings("unchecked") 28 | public class CoreContext { 29 | 30 | public final static String PRODUCT_USER_DIR = System.getProperty("user.home") + File.separator + ".http4e"; 31 | 32 | private static CoreContext context; 33 | static { 34 | context = new CoreContext(); 35 | } 36 | 37 | 38 | public static CoreContext getContext(){ 39 | return context; 40 | } 41 | 42 | private Map objectMap = new HashMap(); 43 | 44 | 45 | public Object getObject( Object key){ 46 | return objectMap.get(key); 47 | } 48 | 49 | 50 | public void putObject( Object key, Object value){ 51 | objectMap.put(key, value); 52 | } 53 | 54 | 55 | public String toString(){ 56 | return "CoreContext{" + "" + objectMap + "}"; 57 | } 58 | 59 | public static Shell SHELL; 60 | 61 | } 62 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/CoreMessages.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core; 17 | 18 | /** 19 | * @author Atanas Roussev (http://nextinterfaces.com) 20 | */ 21 | public interface CoreMessages { 22 | 23 | String VERSION = "5.0.12"; 24 | String PLUGIN_NAME = "HTTP4e Client"; 25 | String PLUGIN_NAME_SHORT = "http4e"; 26 | String PLUGIN_ABOUT = "Version: " + VERSION; 27 | 28 | String HEADER_DEFAULTS = ""; // "header=value"; 29 | String PARAM_DEFAULTS = ""; // "parameter=value"; 30 | String EMPTY_TITLE = "New Tab"; 31 | String EMPTY_TITLE_NAME = "New Tab"; 32 | 33 | String CONNECTION_REFUSED = "\n\tUnable to connect: Can't establish a connection to server \n\n\t"; 34 | String CONNECTION_DROPPED = "\n\tIO error: The server dropped connection on us \n\n\t"; 35 | String CONNECTION_IO_ERR = "\n\tIO error: Can't establish a connection to server \n\n\t"; 36 | String CONNECTION_ILLEAGAL = "\n\tWrong argumens: HTTP4e can't establish a connection to server \n\n\t"; 37 | String CONNECTION_UNKNOWN = "\n\tHTTP4e can't establish a connection to server \n\n\t"; 38 | String ABORTED = ""; 39 | 40 | String LICENSE_TITLE = "HTTP4e License"; 41 | } 42 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/CoreObjects.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core; 17 | 18 | /** 19 | * @author Atanas Roussev (http://nextinterfaces.com) 20 | */ 21 | public interface CoreObjects { 22 | 23 | String RESOURCE_CACHE = "resource.cache"; 24 | String ROOT_PATH_CORE = "root.core"; 25 | String ROOT_PATH_UI = "root.ui"; 26 | 27 | String HTTP_HEADERS = "http.headers"; 28 | String HTTP_HEADER_VALUES = "http.header.values"; 29 | String HEADER_TYPE_TRACKER = "header.type.tracker"; 30 | String PARAM_TYPE_TRACKER = "param.type.tracker"; 31 | String IS_STANDALONE = "is.standalone"; 32 | String AUTH_ITEM = "auth.bean"; 33 | String PROXY_ITEM = "proxy.bean"; 34 | String PARAMETERIZE_ARGS = "parameterize.args"; 35 | String RESPONSE_VIEW_SIZE = "resp.size"; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/ExceptionHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core; 17 | 18 | /** 19 | * Central repository handling all exception types. 20 | * 21 | * @author Atanas Roussev (http://nextinterfaces.com) 22 | */ 23 | public class ExceptionHandler { 24 | 25 | private final static boolean WARN_ENABLED = false; 26 | 27 | 28 | public static void handle( Throwable e){ 29 | e.printStackTrace(); 30 | if (e.getCause() != null) { 31 | handle(e.getCause()); 32 | } 33 | } 34 | 35 | 36 | public static void print( String msg){ 37 | System.out.println(">>>>" + msg); 38 | } 39 | 40 | 41 | public static void warn( String msg){ 42 | if (WARN_ENABLED) { 43 | System.err.println(msg); 44 | } 45 | } 46 | 47 | 48 | public static void warn( Exception e){ 49 | if (WARN_ENABLED) { 50 | System.err.println(e); 51 | } 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/misc/ApacheHttpListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.misc; 17 | 18 | /** 19 | * @author Atanas Roussev (http://nextinterfaces.com) 20 | */ 21 | public interface ApacheHttpListener { 22 | 23 | void write( byte[] data); 24 | 25 | void close(); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/misc/ApacheOutputStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.misc; 17 | 18 | import java.io.FilterOutputStream; 19 | import java.io.IOException; 20 | import java.io.OutputStream; 21 | 22 | /** 23 | * Logs all data written to the wire LOG. 24 | * 25 | * @author Oleg Kalnichevski 26 | * 27 | * @since 2.0beta1 28 | */ 29 | public class ApacheOutputStream extends FilterOutputStream { 30 | 31 | /** Original input stream. */ 32 | private OutputStream out; 33 | 34 | private ApacheHttpListener apacheHttpListener; 35 | 36 | /** 37 | * Create an instance that wraps the specified output stream. 38 | * @param out The output stream. 39 | * @param wire The Wire log to use. 40 | */ 41 | public ApacheOutputStream(ApacheHttpListener apacheHttpListener, OutputStream out/*, Wire wire*/) { 42 | super(out); 43 | this.out = out; 44 | this.apacheHttpListener = apacheHttpListener; 45 | } 46 | 47 | /** 48 | * 49 | * @see java.io.OutputStream#write(byte[], int, int) 50 | */ 51 | public void write(byte[] b, int off, int len) throws IOException { 52 | this.out.write(b, off, len); 53 | apacheHttpListener.write(b); 54 | } 55 | 56 | /** 57 | * 58 | * @see java.io.OutputStream#write(byte[]) 59 | */ 60 | public void write(byte[] b) throws IOException { 61 | this.out.write(b); 62 | apacheHttpListener.write(b); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/misc/JobListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.misc; 17 | 18 | /** 19 | * @author Atanas Roussev (http://nextinterfaces.com) 20 | */ 21 | public interface JobListener { 22 | 23 | /** 24 | * Starts buz operation, result is passed into update() method. 25 | */ 26 | Object execute(); 27 | 28 | /** 29 | * A callback update with result after job execution. 30 | */ 31 | void update( Object value); 32 | 33 | boolean isDisposed(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/misc/JobRunner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.misc; 17 | 18 | import org.eclipse.swt.widgets.Composite; 19 | import org.eclipse.swt.widgets.Display; 20 | 21 | /** 22 | * @author Atanas Roussev (http://nextinterfaces.com) 23 | */ 24 | public class JobRunner implements Runnable { 25 | 26 | private boolean done = false; 27 | private JobListener listener; 28 | private Composite composite; 29 | 30 | public JobRunner( Composite composite, JobListener listener) { 31 | this.listener = listener; 32 | this.composite = composite; 33 | } 34 | 35 | public void run(){ 36 | // main swt thread 37 | final Display display = Display.getDefault(); 38 | 39 | // start separate thread 40 | Thread separateThread = new Thread(new Runnable() { 41 | public void run(){ 42 | 43 | if (display.isDisposed()) return; 44 | final Object execObj = listener.execute(); 45 | 46 | if (display.isDisposed()) return; 47 | display.syncExec(new Runnable() { 48 | public void run(){ 49 | // sync back to main swt thread 50 | if (listener.isDisposed()) 51 | return; 52 | listener.update(execObj); 53 | } 54 | }); 55 | done = true; 56 | 57 | if (display.isDisposed()) return; 58 | display.wake(); 59 | } 60 | }); 61 | separateThread.start(); 62 | 63 | while (!done && !composite.isDisposed()) { 64 | if (!display.readAndDispatch()) 65 | display.sleep(); 66 | } 67 | } 68 | 69 | public boolean isFinished(){ 70 | return done; 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/model/Model.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.model; 17 | 18 | import java.io.Serializable; 19 | 20 | /** 21 | * @author Atanas Roussev (http://nextinterfaces.com) 22 | */ 23 | public interface Model { 24 | 25 | void addListener( ModelListener listener); 26 | 27 | void removeListener( ModelListener listener); 28 | 29 | void fireExecute( ModelEvent e); 30 | 31 | public Serializable getSerializable(); 32 | 33 | public void load( Serializable serializable); 34 | } 35 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/model/ModelListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.model; 17 | 18 | /** 19 | * @author Atanas Roussev (http://nextinterfaces.com) 20 | */ 21 | public interface ModelListener { 22 | 23 | public void executed( ModelEvent e); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/view/Animator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.view; 17 | 18 | import org.eclipse.swt.graphics.Image; 19 | import org.eclipse.swt.graphics.ImageLoader; 20 | import org.eclipse.swt.widgets.Control; 21 | import org.roussev.http4e.httpclient.core.CoreConstants; 22 | import org.roussev.http4e.httpclient.core.CoreImages; 23 | import org.roussev.http4e.httpclient.core.misc.CoreException; 24 | import org.roussev.http4e.httpclient.core.util.ResourceUtils; 25 | 26 | /** 27 | * @author Atanas Roussev (http://nextinterfaces.com) 28 | */ 29 | class Animator { 30 | 31 | private AnimatedGIFRunner gifRunner; 32 | private Control parent; 33 | private Image backgroundImage; 34 | 35 | Animator( Control parent, Image backgroundImage) { 36 | this.parent = parent; 37 | this.backgroundImage = backgroundImage; 38 | } 39 | 40 | void start(){ 41 | if(gifRunner != null) gifRunner.stop(); 42 | try { 43 | ImageLoader imageLoader = new ImageLoader(); 44 | imageLoader.load( ResourceUtils.getBundleResourceStream(CoreConstants.PLUGIN_CORE, CoreImages.LOADING_ON)); 45 | gifRunner = new AnimatedGIFRunner(parent, imageLoader, backgroundImage); 46 | } catch (Exception e) { 47 | throw CoreException.getInstance(CoreException.GENERAL, e); 48 | } 49 | final Thread animeThread = new Thread(gifRunner); 50 | animeThread.setDaemon(true); 51 | animeThread.start(); 52 | } 53 | 54 | void stop(){ 55 | if(gifRunner != null) gifRunner.stop(); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/view/ExecuteCommand.java: -------------------------------------------------------------------------------- 1 | package org.roussev.http4e.httpclient.core.client.view; 2 | 3 | 4 | public interface ExecuteCommand { 5 | 6 | void execute(); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/view/ExecuteKeyListener.java: -------------------------------------------------------------------------------- 1 | package org.roussev.http4e.httpclient.core.client.view; 2 | 3 | import org.eclipse.swt.events.KeyEvent; 4 | import org.eclipse.swt.events.KeyListener; 5 | 6 | public class ExecuteKeyListener implements KeyListener { 7 | 8 | private static final int SHIFT = 1 << 17; 9 | 10 | private static final int CTRL = 1 << 18; 11 | 12 | private ExecuteCommand cmd; 13 | 14 | 15 | public ExecuteKeyListener( ExecuteCommand cmd) { 16 | this.cmd = cmd; 17 | } 18 | 19 | public void keyPressed( KeyEvent e){ 20 | // pass through 21 | } 22 | 23 | public void keyReleased( KeyEvent e){ 24 | // String string = "";// e.type == SWT.KeyDown ? "DOWN:" : "UP :"; 25 | // string += " stateMask=0x" + Integer.toHexString(e.stateMask) + 26 | // Snippet25.stateMask(e.stateMask) + ","; 27 | // string += " keyCode=0x" + Integer.toHexString(e.keyCode) + " " + 28 | // Snippet25.keyCode(e.keyCode) + ","; 29 | // string += " character=0x" + Integer.toHexString(e.character) + " " + 30 | // Snippet25.character(e.character); 31 | // if (e.keyLocation != 0) { 32 | // string += " location="; 33 | // if (e.keyLocation == SWT.LEFT) 34 | // string += "LEFT"; 35 | // if (e.keyLocation == SWT.RIGHT) 36 | // string += "RIGHT"; 37 | // if (e.keyLocation == SWT.KEYPAD) 38 | // string += "KEYPAD"; 39 | // 40 | // } 41 | 42 | if ((e.stateMask & CTRL) != 0 && (e.stateMask & SHIFT) != 0 && e.keyCode == 'r') { 43 | // System.out.println(string); 44 | // model.fireExecute(new ModelEvent(ModelEvent.PARAMS_FOCUS_LOST, 45 | // model)); 46 | // model.fireExecute(new ModelEvent(ModelEvent.REQUEST_START, model)); 47 | cmd.execute(); 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/view/IControlView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.view; 17 | 18 | import org.eclipse.swt.widgets.Control; 19 | 20 | /** 21 | * @author Atanas Roussev (http://nextinterfaces.com) 22 | */ 23 | interface IControlView { 24 | 25 | Control getControl(); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/view/ItemState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.view; 17 | 18 | /** 19 | * @author Atanas Roussev (http://nextinterfaces.com) 20 | */ 21 | class ItemState { 22 | 23 | public final static int POST_NO_UPDATE = 0; 24 | public final static int POST_ENABLED = 1; 25 | public final static int POST_DISABLED = 2; 26 | 27 | public final static int HTTP_STARTED = 3; 28 | public final static int HTTP_STOPPED = 4; 29 | public final static int HTTP_ABORTED = 5; 30 | 31 | private int state = POST_NO_UPDATE; 32 | private boolean xwwwEnabled = true; 33 | 34 | public int getState(){ 35 | return state; 36 | } 37 | 38 | public void setState( int state){ 39 | this.state = state; 40 | } 41 | 42 | public boolean isXwwwTypeEnabled(){ 43 | return xwwwEnabled; 44 | } 45 | 46 | public void setXwwwTypeEnabled( boolean xwwwEnabled){ 47 | this.xwwwEnabled = xwwwEnabled; 48 | } 49 | 50 | public String toString(){ 51 | return "ItemState{state=" + getState() + ",xwwwEnabled=" + isXwwwTypeEnabled() + "}"; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/view/ParamTableView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.view; 17 | 18 | import org.eclipse.swt.widgets.Composite; 19 | import org.eclipse.swt.widgets.Control; 20 | import org.roussev.http4e.httpclient.core.client.model.ItemModel; 21 | 22 | 23 | /** 24 | * @author Atanas Roussev (http://nextinterfaces.com) 25 | */ 26 | class ParamTableView implements IControlView { 27 | 28 | Control control; 29 | 30 | ParamTableView( final ItemModel model, Composite parent) { 31 | control = new ParamTable().createContents(parent); 32 | } 33 | 34 | public Control getControl(){ 35 | return control; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/view/SWTHelloWorld.java: -------------------------------------------------------------------------------- 1 | package org.roussev.http4e.httpclient.core.client.view; 2 | 3 | import org.eclipse.jface.text.source.SourceViewer; 4 | import org.eclipse.swt.SWT; 5 | import org.eclipse.swt.custom.StyledText; 6 | import org.eclipse.swt.layout.FillLayout; 7 | import org.eclipse.swt.widgets.Composite; 8 | import org.eclipse.swt.widgets.Display; 9 | import org.eclipse.swt.widgets.Shell; 10 | import org.roussev.http4e.editor.xml.XMLConfiguration; 11 | import org.roussev.http4e.httpclient.core.client.view.assist.DocumentUtils; 12 | import org.roussev.http4e.httpclient.core.misc.ColorManagerAdaptor; 13 | import org.roussev.http4e.httpclient.core.util.ResourceUtils; 14 | 15 | public class SWTHelloWorld { 16 | 17 | private static StyledText buildEditorText( Composite parent){ 18 | final SourceViewer sourceViewer = new SourceViewer(parent, null, SWT.MULTI | SWT.V_SCROLL | SWT.WRAP); 19 | 20 | final XMLConfiguration sourceConf = new XMLConfiguration(new ColorManagerAdaptor(ResourceUtils.getResourceCache())); 21 | sourceViewer.configure(sourceConf); 22 | sourceViewer.setDocument(DocumentUtils.createDocument2()); 23 | 24 | return sourceViewer.getTextWidget(); 25 | } 26 | 27 | 28 | public static void main( String[] args){ 29 | 30 | Shell shell = new Shell(); 31 | shell.setLayout(new FillLayout()); 32 | shell.setSize(200, 100); 33 | Display display = shell.getDisplay(); 34 | 35 | // JsonTextEditor editor = new JsonTextEditor(); 36 | // editor.gete 37 | 38 | StyledText styledText = buildEditorText(shell); 39 | 40 | shell.open(); 41 | 42 | while (!shell.isDisposed()) { 43 | if (!display.readAndDispatch()) { 44 | display.sleep(); 45 | } 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/view/assist/AssistConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.view.assist; 17 | 18 | /** 19 | * @author Atanas Roussev (http://nextinterfaces.com) 20 | */ 21 | public interface AssistConstants { 22 | 23 | char EQUAL = '='; 24 | char SHARP = '#'; 25 | 26 | String S_EQUAL = String.valueOf(EQUAL); 27 | String S_SHARP = String.valueOf(SHARP); 28 | 29 | String BRACKETS_COMPLETION = "="; 30 | 31 | String CONTENT_TYPE_MULTIPART = "multipart/form-data"; 32 | String CONTENT_TYPE_X_WWW_FORM = "application/x-www-form-urlencoded"; 33 | String HEADER_CONTENT_TYPE = "content-type"; 34 | String HEADER_ACCEPT_CHARSET = "accept-charset"; 35 | String HEADER_ACCEPT_LANGUAGE = "accept-language"; 36 | String HEADER_DATE = "date"; 37 | String HEADER_IF_MOD_SINCE = "if-modified-since"; 38 | String HEADER_RETRY_AFTER = "Retry-After"; 39 | String HEADER_LAST_MODIFIED = "Last-Modified"; 40 | String HEADER_IF_UNMOD_SINCE = "If-Unmodified-Since"; 41 | String HEADER_EXPIRES = "Expires"; 42 | 43 | 44 | char LINE_DELIM_NL = '\n'; //10 45 | char LINE_DELIM_CR = '\r'; //13 46 | // String CRLF = System.getProperty("line.separator"); 47 | 48 | String S_NL = String.valueOf(LINE_DELIM_NL); 49 | String PARAM_LINE_DELIM = "\r\n&"; 50 | String PARAM_DELIM_EQ = "="; 51 | 52 | } 53 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/view/assist/HAssistInfoMap.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.view.assist; 17 | 18 | import java.io.IOException; 19 | import java.io.InputStream; 20 | import java.util.Properties; 21 | 22 | import org.roussev.http4e.httpclient.core.CoreConstants; 23 | import org.roussev.http4e.httpclient.core.ExceptionHandler; 24 | import org.roussev.http4e.httpclient.core.util.ResourceUtils; 25 | 26 | /** 27 | * @author Atanas Roussev (http://nextinterfaces.com) 28 | */ 29 | public class HAssistInfoMap { 30 | 31 | private Properties data; 32 | 33 | public HAssistInfoMap(String file){ 34 | data = new Properties(); 35 | try { 36 | InputStream in = ResourceUtils.getBundleResourceStream2(CoreConstants.PLUGIN_CORE, file); 37 | if(in != null) data.load(in); 38 | } catch (IOException ignore) { 39 | ExceptionHandler.warn(ignore); 40 | } 41 | } 42 | 43 | public String getInfo(String key){ 44 | String val = data.getProperty(key); 45 | return val; 46 | } 47 | 48 | public String toString(){ 49 | return "HAssistInfoMap:" + data; 50 | } 51 | 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/view/assist/HCommentScanner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.view.assist; 17 | 18 | import org.eclipse.jface.text.rules.IRule; 19 | import org.eclipse.jface.text.rules.RuleBasedScanner; 20 | 21 | /** 22 | * @author Atanas Roussev (http://nextinterfaces.com) 23 | */ 24 | public class HCommentScanner extends RuleBasedScanner { 25 | 26 | public HCommentScanner() { 27 | // IToken comment = new Token(HPartitionScanner.COMMENT); 28 | setRules(new IRule[] { 29 | // new SingleLineRule("#", null, comment, '\\', true, true), 30 | // new WhitespaceRule(new WhitespaceDetector()) 31 | }); 32 | } 33 | } 34 | 35 | 36 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/view/assist/HPartitionScanner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.view.assist; 17 | 18 | import org.eclipse.jface.text.rules.IPredicateRule; 19 | import org.eclipse.jface.text.rules.IToken; 20 | import org.eclipse.jface.text.rules.RuleBasedPartitionScanner; 21 | import org.eclipse.jface.text.rules.SingleLineRule; 22 | import org.eclipse.jface.text.rules.Token; 23 | 24 | /** 25 | * @author Atanas Roussev (http://nextinterfaces.com) 26 | */ 27 | public class HPartitionScanner extends RuleBasedPartitionScanner { 28 | 29 | public final static String PROPERTIES_PARTITIONING = "___pf_partitioning"; 30 | public final static String COMMENT = "__pf_comment"; 31 | public final static String PROPERTY_VALUE = "__pf_property_value"; 32 | // public final static String PROPERTY_KEY = "__pf_property_key"; 33 | 34 | public final static String[] PARTITIONS = new String[] { 35 | COMMENT, PROPERTY_VALUE, /*PROPERTY_KEY*/ 36 | }; 37 | 38 | 39 | public HPartitionScanner() { 40 | // IToken key= new Token(IDocument.DEFAULT_CONTENT_TYPE); 41 | IToken comment = new Token(COMMENT); 42 | IToken propertyValue = new Token(PROPERTY_VALUE); 43 | 44 | setPredicateRules(new IPredicateRule[] { 45 | new SingleLineRule(AssistConstants.PARAM_DELIM_EQ, null, propertyValue, '\\', true, true), 46 | new SingleLineRule("#", null, comment, (char) 0, true, true), }); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/view/assist/HValueScanner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.view.assist; 17 | 18 | import org.eclipse.jface.text.rules.IRule; 19 | import org.eclipse.jface.text.rules.RuleBasedScanner; 20 | 21 | /** 22 | * @author Atanas Roussev (http://nextinterfaces.com) 23 | */ 24 | public class HValueScanner extends RuleBasedScanner { 25 | 26 | public HValueScanner() { 27 | // IToken string = new Token(new TextAttribute(ResourceUtils.getColor(Styles.PROC_INSTR))); 28 | 29 | setRules(new IRule[] { 30 | // new SingleLineRule("\"", "\"", string, '\\'), 31 | // new SingleLineRule("'", "'", string, '\\'), 32 | // new SingleLineRule("<", "/>", string, '\\'), 33 | // new WhitespaceRule(new WhitespaceDetector()) 34 | }); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/view/assist/ModelTrackerListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.view.assist; 17 | 18 | /** 19 | * @author Atanas Roussev (http://nextinterfaces.com) 20 | */ 21 | public interface ModelTrackerListener { 22 | 23 | void fireExecute(String key, String value); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/view/assist/MyAnnotationHover.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.view.assist; 17 | 18 | import org.eclipse.jface.text.BadLocationException; 19 | import org.eclipse.jface.text.IDocument; 20 | import org.eclipse.jface.text.IRegion; 21 | import org.eclipse.jface.text.source.IAnnotationHover; 22 | import org.eclipse.jface.text.source.ISourceViewer; 23 | 24 | /** 25 | * @author Atanas Roussev (http://nextinterfaces.com) 26 | */ 27 | public class MyAnnotationHover implements IAnnotationHover { 28 | 29 | public String getHoverInfo( ISourceViewer sourceViewer, int lineNumber){ 30 | IDocument document = sourceViewer.getDocument(); 31 | try { 32 | IRegion info = document.getLineInformation(lineNumber); 33 | return document.get(info.getOffset(), info.getLength()); 34 | } catch (BadLocationException x) { 35 | } 36 | return null; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/client/view/assist/WhitespaceDetector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.client.view.assist; 17 | 18 | import org.eclipse.jface.text.rules.IWhitespaceDetector; 19 | 20 | /** 21 | * @author Atanas Roussev (http://nextinterfaces.com) 22 | */ 23 | public class WhitespaceDetector implements IWhitespaceDetector { 24 | 25 | public boolean isWhitespace(char c) { 26 | return (c == ' ' || c == '\t' || c == '\n' || c == '\r'); 27 | } 28 | // public boolean isWhitespace( char c){ 29 | // return Character.isWhitespace(c); 30 | // } 31 | } 32 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/misc/ColorManagerAdaptor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.misc; 17 | 18 | import org.eclipse.swt.graphics.Color; 19 | import org.eclipse.swt.graphics.RGB; 20 | import org.roussev.http4e.editor.xml.ColorManager; 21 | 22 | 23 | /** 24 | * @author Atanas Roussev (http://nextinterfaces.com) 25 | */ 26 | public class ColorManagerAdaptor implements ColorManager { 27 | 28 | private ResourceCache cache; 29 | 30 | public ColorManagerAdaptor(ResourceCache cache){ 31 | this.cache = cache; 32 | } 33 | 34 | public void dispose(){ 35 | cache.disposeColors(); 36 | } 37 | 38 | public Color getColor( RGB rgb){ 39 | return cache.getColor(rgb); 40 | } 41 | } 42 | 43 | 44 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/misc/Scripts.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.misc; 17 | 18 | /** 19 | * This interface contains the JavaScript functions used across http4E. 20 | * 21 | * @author Atanas Roussev (http://nextinterfaces.com) 22 | */ 23 | public interface Scripts { 24 | 25 | String POPUP_WINDOW = "function popup_window(url, width, height, options){ " + 26 | "var w = (width) ? width : 400;" + 27 | "var h = (height) ? height : 400;" + 28 | "var t = (screen.height) ? (screen.height - h) / 2 : 0;" + 29 | "var l = (screen.width) ? (screen.width - w) / 2 : 0;" + 30 | "var opt = (options) ? options : 'toolbar = 1, location = 1, directories = 1, status = 1, menubar = 1, scrollbars = 1, copyhistory = no, resizable = 1';" + 31 | "var popped = window.open(url, 'popupwindow', 'top = '+t+', left = '+l+', width = '+w+', height = '+h+',' + opt);" + 32 | "popped.focus();" + 33 | "};"; 34 | 35 | String HEADER = "Exported Call

";
36 |    String FOOTER = "
"; 37 | 38 | 39 | } 40 | 41 | 42 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/util/JsonUtil.java: -------------------------------------------------------------------------------- 1 | package org.roussev.http4e.httpclient.core.util; 2 | 3 | public class JsonUtil { 4 | 5 | public static String hexToChar( String i, String j, String k, String l){ 6 | return Character.toString((char) Integer.parseInt("" + i + j + k + l, 16)); 7 | } 8 | 9 | 10 | public static String render( String value, boolean hubav, String indent){ 11 | final StringBuilder sb = new StringBuilder(); 12 | if (hubav) { 13 | sb.append(indent); 14 | } 15 | 16 | sb.append("\""); 17 | int len = value.length(); 18 | for (int i = 0; i < len; i++) { 19 | final char lChar = value.charAt(i); 20 | if (lChar == '\n') { 21 | sb.append("\\n"); 22 | } else if (lChar == '\r') { 23 | sb.append("\\r"); 24 | } else if (lChar == '\f') { 25 | sb.append("\\f"); 26 | } else if (lChar == '\t') { 27 | sb.append("\\t"); 28 | } else if (lChar == '\b') { 29 | sb.append("\\b"); 30 | // else if(lChar == '/') lBuf.append("\\/"); 31 | } else if (lChar == '\"') { 32 | sb.append("\\\""); 33 | } else if (lChar == '\\') { 34 | sb.append("\\\\"); 35 | } else { 36 | sb.append(lChar); 37 | } 38 | } 39 | 40 | return sb.append("\"").toString(); 41 | } 42 | 43 | public static void main( String[] args){ 44 | System.out.println(render( 45 | "{\"JSON\":\"Hello, World!\"}"//"[50,0,0,49,[\"hhhh\"],0,0,1,288,]" 46 | , false, " ")); 47 | 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/util/ParseBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.util; 17 | 18 | import java.util.Collection; 19 | import java.util.HashSet; 20 | import java.util.Set; 21 | 22 | /** 23 | * @author Atanas Roussev (http://nextinterfaces.com) 24 | */ 25 | class ParseBean { 26 | 27 | public String key; 28 | public Set values = new HashSet(); 29 | 30 | public ParseBean( String key) { 31 | this.key = key; 32 | } 33 | 34 | public String getKey(){ 35 | return key; 36 | } 37 | 38 | public void addValue( String val){ 39 | this.values.add(val); 40 | } 41 | 42 | public Collection getValues(){ 43 | return values; 44 | } 45 | 46 | public String toString(){ 47 | return "Param{" + 48 | "key=" + key + 49 | ",values=" + values + 50 | "}"; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/util/ResponseReader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.util; 17 | 18 | import org.apache.commons.httpclient.HttpMethod; 19 | 20 | /** 21 | * @author Atanas Roussev (http://nextinterfaces.com) 22 | */ 23 | public interface ResponseReader { 24 | 25 | void read(HttpMethod httpMethod); 26 | 27 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/httpclient/core/util/StringPrintWriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.core.util; 17 | 18 | import java.io.PrintWriter; 19 | import java.io.StringWriter; 20 | 21 | /** 22 | * A PrintWriter that maintains a String as its backing store. 23 | * 24 | * Usage: StringPrintWriter out = new StringPrintWriter(); 25 | * printTo(out); System.out.println( out.getString() ); 26 | */ 27 | class StringPrintWriter extends PrintWriter { 28 | 29 | public StringPrintWriter() { 30 | super(new StringWriter()); 31 | } 32 | 33 | 34 | public StringPrintWriter( int initialSize) { 35 | super(new StringWriter(initialSize)); 36 | } 37 | 38 | 39 | /** 40 | * <p>Since toString() returns information *about* this object, we want a 41 | * separate method to extract just the contents of the internal buffer as a 42 | * String. 43 | *

44 | * 45 | * @return the contents of the internal string buffer 46 | */ 47 | public String getString(){ 48 | flush(); 49 | return ((StringWriter) out).toString(); 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/jmeter/Constants.java: -------------------------------------------------------------------------------- 1 | package org.roussev.http4e.jmeter; 2 | 3 | public class Constants { 4 | 5 | public final static String[] HEADERS = { "Accept", 6 | "Accept-Charset", 7 | "Accept-Encoding", 8 | "Accept-Language", 9 | "Accept-Ranges", 10 | "Age", 11 | "Allow", 12 | "Authorization", 13 | "Cache-Control", 14 | "Connection", 15 | "Content-Encoding", 16 | "Content-Language", 17 | "Content-Length", 18 | "Content-Location", 19 | "Content-MD5", 20 | "Content-Range", 21 | "Content-Type", 22 | "Cookie", 23 | "Date", 24 | "ETag", 25 | "Expect", 26 | "Expires", 27 | "From", 28 | "Host", 29 | "If-Match", 30 | "If-Modified-Since", 31 | "If-None-Match", 32 | "If-Range", 33 | "If-Unmodified-Since", 34 | "Keep-Alive", 35 | "Last-Modified", 36 | "Location", 37 | "Max-Forwards", 38 | "Pragma", 39 | "Proxy-Authenticate", 40 | "Proxy-Authorization", 41 | "Range", 42 | "Referer", 43 | "Retry-After", 44 | "Server", 45 | "TE", 46 | "Trailer", 47 | "Transfer-Encoding", 48 | "Upgrade", 49 | "User-Agent", 50 | "Vary", 51 | "Via", 52 | "Warning", 53 | "WWW-Authenticate" }; 54 | public final static String[] METHODS = { 55 | "POST", 56 | "GET", 57 | "PUT", 58 | "HEAD", 59 | "DELETE", 60 | "TRACE", 61 | "OPTIONS" }; 62 | } 63 | -------------------------------------------------------------------------------- /http4e-Core/src/app/org/roussev/http4e/jmeter/ExportTemplateTransformer.java: -------------------------------------------------------------------------------- 1 | package org.roussev.http4e.jmeter; 2 | 3 | import java.io.StringWriter; 4 | import java.io.Writer; 5 | import java.util.Properties; 6 | 7 | import org.apache.velocity.Template; 8 | import org.apache.velocity.VelocityContext; 9 | import org.apache.velocity.app.Velocity; 10 | import org.apache.velocity.exception.ParseErrorException; 11 | import org.apache.velocity.exception.ResourceNotFoundException; 12 | import org.roussev.http4e.httpclient.core.ExceptionHandler; 13 | import org.roussev.http4e.httpclient.core.util.HttpBean; 14 | 15 | public class ExportTemplateTransformer { 16 | 17 | private String templateFile; 18 | private HttpBean httpBean; 19 | 20 | 21 | public ExportTemplateTransformer( String templateFile, HttpBean httpBean) { 22 | this.templateFile = templateFile; 23 | this.httpBean = httpBean; 24 | } 25 | 26 | public void doWrite( Writer writer){ 27 | try { 28 | 29 | Properties p = new Properties(); 30 | 31 | // p.setProperty("resource.loader", "file"); 32 | //// p.setProperty("file.resource.loader.path", "./src"); 33 | // p.setProperty("file.resource.loader.class", 34 | // "org.apache.velocity.runtime.resource.loader.FileResourceLoader"); 35 | 36 | p.setProperty("resource.loader", "class"); 37 | p.setProperty("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); 38 | 39 | Velocity.init(p); 40 | 41 | VelocityContext context = new VelocityContext(); 42 | context.put("httpBean", httpBean); 43 | 44 | Template template = null; 45 | 46 | try { 47 | template = Velocity.getTemplate(templateFile); 48 | } catch (ResourceNotFoundException e) { 49 | ExceptionHandler.handle(e); 50 | } catch (ParseErrorException e) { 51 | ExceptionHandler.handle(e); 52 | } 53 | 54 | if (template != null) { 55 | template.merge(context, writer); 56 | } 57 | /* 58 | * flush and cleanup 59 | */ 60 | 61 | writer.flush(); 62 | writer.close(); 63 | } catch (Exception e) { 64 | ExceptionHandler.handle(e); 65 | } 66 | } 67 | 68 | public static void main( String[] args){ 69 | 70 | new ExportTemplateTransformer("/resources/http4e-item.vm", new HttpBean()).doWrite(new StringWriter()); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /http4e-Feature/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /http4e-Feature/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | http4e-Feature 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.FeatureBuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.pde.FeatureNature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | -------------------------------------------------------------------------------- /http4e-Feature/ant.project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /http4e-Feature/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = feature.xml 2 | -------------------------------------------------------------------------------- /http4e-Plugin/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /http4e-Plugin/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | http4e-Plugin 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 | -------------------------------------------------------------------------------- /http4e-Plugin/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | #Fri Jul 31 23:41:12 PDT 2009 2 | eclipse.preferences.version=1 3 | encoding/about.ini=UTF-8 4 | -------------------------------------------------------------------------------- /http4e-Plugin/.settings/org.eclipse.jdt.ui.prefs: -------------------------------------------------------------------------------- 1 | #Wed Aug 29 23:26:11 PDT 2007 2 | eclipse.preferences.version=1 3 | formatter_profile=_http4e 4 | formatter_settings_version=10 5 | internal.default.compliance=default 6 | org.eclipse.jdt.ui.text.custom_code_templates=\r\n 7 | -------------------------------------------------------------------------------- /http4e-Plugin/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: Eclipse HttpClient (HTTP4e) 4 | Bundle-SymbolicName: org.roussev.http4e.ui;singleton:=true 5 | Bundle-Version: 5.0.12 6 | Bundle-Activator: org.roussev.http4e.httpclient.ui.HdPlugin 7 | Bundle-Vendor: NEXTinterfaces.com 8 | Bundle-Localization: plugin 9 | Eclipse-LazyStart: true 10 | Require-Bundle: org.eclipse.ui, 11 | org.eclipse.core.runtime, 12 | org.eclipse.core.resources, 13 | org.eclipse.ui.ide, 14 | org.eclipse.jface.text, 15 | org.eclipse.ui.workbench.texteditor, 16 | org.eclipse.ui.editors, 17 | org.roussev.http4e.core 18 | -------------------------------------------------------------------------------- /http4e-Plugin/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /http4e-Plugin/about.ini: -------------------------------------------------------------------------------- 1 | aboutText=Eclipse HttpClient (HTTP4e)\n\n\ 2 | Product delivered by nextinterfaces.com team provider\n\ 3 | Visit http://www.nextinterfaces.com/http4e/ \n\ 4 | Version: 5.0.12 \n\n\ 5 | This product includes software developed by Apache http://commons.apache.org/httpclient/ and Eclipse Foundation http://www.eclipse.org/\n\ 6 | \n\ 7 | HTTP4e Rest client by Atanas Roussev (http://nextinterfaces.com). Made in Canada 8 | \n\ 9 | Copyright (c) 2017 nextinterfaces.com. All rights reserved.\n\ 10 | Enjoy this product.\n\ 11 | 12 | featureImage=about.png -------------------------------------------------------------------------------- /http4e-Plugin/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/about.png -------------------------------------------------------------------------------- /http4e-Plugin/ant.project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | 24 | 25 | 26 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /http4e-Plugin/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/app/ 2 | output.. = classes/ 3 | bin.includes = META-INF/,\ 4 | .,\ 5 | about.ini,\ 6 | about.html,\ 7 | about.png,\ 8 | plugin.xml,\ 9 | icons/,\ 10 | resources/,\ 11 | lib/ 12 | 13 | -------------------------------------------------------------------------------- /http4e-Plugin/icons/auth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/auth.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/auth_enabled copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/auth_enabled copy.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/auth_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/auth_enabled.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/auth_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/auth_tab.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/csharp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/csharp.gif -------------------------------------------------------------------------------- /http4e-Plugin/icons/duplicate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/duplicate.gif -------------------------------------------------------------------------------- /http4e-Plugin/icons/export.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/export.gif -------------------------------------------------------------------------------- /http4e-Plugin/icons/flex.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/flex.gif -------------------------------------------------------------------------------- /http4e-Plugin/icons/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/help.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/import.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/import.gif -------------------------------------------------------------------------------- /http4e-Plugin/icons/java.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/java.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/jmeter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/jmeter.gif -------------------------------------------------------------------------------- /http4e-Plugin/icons/jmeter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/jmeter.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/js.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/js.gif -------------------------------------------------------------------------------- /http4e-Plugin/icons/logo-dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/logo-dialog.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/logo.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/magn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/magn.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/oc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/oc.gif -------------------------------------------------------------------------------- /http4e-Plugin/icons/params.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/params.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/php.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/php.gif -------------------------------------------------------------------------------- /http4e-Plugin/icons/print.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/print.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/print_edit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/print_edit.gif -------------------------------------------------------------------------------- /http4e-Plugin/icons/proxy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/proxy.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/proxy_enabled copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/proxy_enabled copy.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/proxy_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/proxy_enabled.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/proxy_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/proxy_tab.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/python.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/python.gif -------------------------------------------------------------------------------- /http4e-Plugin/icons/ruby.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/ruby.gif -------------------------------------------------------------------------------- /http4e-Plugin/icons/saveas_edit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/saveas_edit.gif -------------------------------------------------------------------------------- /http4e-Plugin/icons/tab-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/tab-new.png -------------------------------------------------------------------------------- /http4e-Plugin/icons/vb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/vb.gif -------------------------------------------------------------------------------- /http4e-Plugin/icons/views.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/icons/views.png -------------------------------------------------------------------------------- /http4e-Plugin/lib/commons-lang-2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/http4e/a615bb7663248e76392726ffff401c433a600991/http4e-Plugin/lib/commons-lang-2.3.jar -------------------------------------------------------------------------------- /http4e-Plugin/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 10 | 11 | 18 | 19 | 20 | 37 | 38 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /http4e-Plugin/resources/src.html: -------------------------------------------------------------------------------- 1 | Exported Call 2 | 3 | 4 |
 5 | 	public class Translator {
6 | public static Object httppacketToFoldertab(String requestPacket){ 7 | return null; 8 | } 9 | public static String foldertabToJavaSource(String requestPacket){ 10 | return null; 11 | }} 12 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /http4e-Plugin/run.product.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/UIConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.ui; 17 | 18 | /** 19 | * @author Atanas Roussev (http://nextinterfaces.com) 20 | */ 21 | public interface UIConstants { 22 | 23 | String PLUGIN_ID = "org.roussev.http4e.ui"; 24 | } 25 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/actions/AddTabAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.ui.actions; 17 | 18 | import org.eclipse.jface.action.Action; 19 | import org.roussev.http4e.httpclient.core.client.view.FolderView; 20 | import org.roussev.http4e.httpclient.ui.HdViewPart; 21 | 22 | 23 | /** 24 | * @author Atanas Roussev (http://nextinterfaces.com) 25 | */ 26 | public class AddTabAction extends Action { 27 | 28 | private HdViewPart view; 29 | 30 | public AddTabAction( HdViewPart view) { 31 | super(); 32 | this.view = view; 33 | setText("Open a new tab"); 34 | setDescription("Open a new tab"); 35 | setToolTipText("Open a new tab"); 36 | } 37 | 38 | public void run(){ 39 | FolderView folderView = view.getFolderView(); 40 | folderView.addTab(); 41 | } 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/actions/AuthenticationAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.ui.actions; 17 | 18 | import org.eclipse.jface.action.Action; 19 | import org.roussev.http4e.httpclient.core.ExceptionHandler; 20 | import org.roussev.http4e.httpclient.ui.HdViewPart; 21 | 22 | public class AuthenticationAction extends Action { 23 | 24 | private HdViewPart view; 25 | 26 | 27 | public AuthenticationAction( HdViewPart view) { 28 | super(); 29 | this.view = view; 30 | setText("BASIC and DIGEST Authentication"); 31 | setDescription("BASIC and DIGEST Authentication"); 32 | setToolTipText("BASIC and DIGEST Authentication"); 33 | } 34 | 35 | 36 | public void run(){ 37 | try { 38 | AuthDialog dialog = new AuthDialog(view); 39 | dialog.open(); 40 | } catch (Exception e) { 41 | ExceptionHandler.handle(e); 42 | } 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/actions/ConfigAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.ui.actions; 17 | 18 | import org.eclipse.jface.action.Action; 19 | import org.eclipse.ui.part.ViewPart; 20 | 21 | public class ConfigAction extends Action { 22 | 23 | private ViewPart view; 24 | 25 | 26 | public ConfigAction( ViewPart view, String title) { 27 | super(); 28 | this.view = view; 29 | 30 | setText(title); 31 | setDescription(title); 32 | setToolTipText(title); 33 | } 34 | 35 | 36 | public void run(){ 37 | ConfigDialog dialog = new ConfigDialog(view); 38 | dialog.open(); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/actions/DuplicateTabAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.ui.actions; 17 | 18 | import org.eclipse.jface.action.Action; 19 | import org.roussev.http4e.httpclient.core.client.view.FolderView; 20 | import org.roussev.http4e.httpclient.ui.HdViewPart; 21 | 22 | /** 23 | * @author Atanas Roussev (http://nextinterfaces.com) 24 | */ 25 | public class DuplicateTabAction extends Action { 26 | 27 | private HdViewPart view; 28 | 29 | 30 | public DuplicateTabAction( HdViewPart view) { 31 | super(); 32 | this.view = view; 33 | setText("Duplicate tab"); 34 | setDescription("Duplicate tab"); 35 | setToolTipText("Duplicate tab"); 36 | } 37 | 38 | 39 | public void run(){ 40 | FolderView folderView = view.getFolderView(); 41 | folderView.duplicateTab(); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/actions/ExportEmptyAction.java: -------------------------------------------------------------------------------- 1 | package org.roussev.http4e.httpclient.ui.actions; 2 | 3 | import org.eclipse.jface.action.Action; 4 | import org.eclipse.swt.widgets.Menu; 5 | import org.eclipse.ui.part.ViewPart; 6 | 7 | public class ExportEmptyAction extends Action { 8 | 9 | private Menu fMenu; 10 | 11 | public ExportEmptyAction( ViewPart view) { 12 | fMenu = null; 13 | setText("Export As .."); 14 | setEnabled(false); 15 | } 16 | 17 | public void dispose(){ 18 | // action is reused, can be called several times. 19 | if (fMenu != null) { 20 | fMenu.dispose(); 21 | fMenu = null; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/actions/ExportPHPAction.java: -------------------------------------------------------------------------------- 1 | package org.roussev.http4e.httpclient.ui.actions; 2 | 3 | import java.io.StringWriter; 4 | 5 | import org.eclipse.jface.action.Action; 6 | import org.eclipse.jface.resource.ImageDescriptor; 7 | import org.eclipse.swt.widgets.Menu; 8 | import org.eclipse.ui.part.ViewPart; 9 | import org.roussev.http4e.httpclient.core.CoreConstants; 10 | import org.roussev.http4e.httpclient.core.CoreImages; 11 | import org.roussev.http4e.httpclient.core.ExceptionHandler; 12 | import org.roussev.http4e.httpclient.core.client.model.ItemModel; 13 | import org.roussev.http4e.httpclient.core.client.model.ModelEvent; 14 | import org.roussev.http4e.httpclient.core.client.view.FolderView; 15 | import org.roussev.http4e.httpclient.core.util.BaseUtils; 16 | import org.roussev.http4e.httpclient.core.util.ResourceUtils; 17 | import org.roussev.http4e.httpclient.ui.HdViewPart; 18 | 19 | public class ExportPHPAction extends Action { 20 | 21 | private ViewPart view; 22 | private Menu fMenu; 23 | 24 | 25 | public ExportPHPAction( ViewPart view) { 26 | this.view = view; 27 | fMenu = null; 28 | setToolTipText("Export call as PHP script"); 29 | setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.PHP))); 30 | setText(" PHP"); 31 | } 32 | 33 | 34 | public void dispose(){ 35 | // action is reused, can be called several times. 36 | if (fMenu != null) { 37 | fMenu.dispose(); 38 | fMenu = null; 39 | } 40 | } 41 | 42 | 43 | // protected void addActionToMenu( Menu parent, Action action){ 44 | // ActionContributionItem item = new ActionContributionItem(action); 45 | // item.fill(parent, -1); 46 | // } 47 | 48 | public void run(){ 49 | try { 50 | FolderView folderView = ((HdViewPart) view).getFolderView(); 51 | ItemModel iModel = folderView.getModel().getItemModel(new Integer(folderView.getSelectionItemHash())); 52 | iModel.fireExecute(new ModelEvent(ModelEvent.EXPORT, iModel)); 53 | 54 | StringWriter writer = new StringWriter(); 55 | BaseUtils.writePHP(iModel, writer); 56 | 57 | ExportDialog dialog = new ExportDialog(view, "PHP Curl HTTP Rest client", 58 | "Your call exported as PHP Curl HTTP Rest client call.", 59 | writer.toString()); 60 | dialog.open(); 61 | } catch (Exception e) { 62 | ExceptionHandler.handle(e); 63 | } 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/actions/ExportRubyAction.java: -------------------------------------------------------------------------------- 1 | package org.roussev.http4e.httpclient.ui.actions; 2 | 3 | import java.io.StringWriter; 4 | 5 | import org.eclipse.jface.action.Action; 6 | import org.eclipse.jface.resource.ImageDescriptor; 7 | import org.eclipse.swt.widgets.Menu; 8 | import org.eclipse.ui.part.ViewPart; 9 | import org.roussev.http4e.httpclient.core.CoreConstants; 10 | import org.roussev.http4e.httpclient.core.CoreImages; 11 | import org.roussev.http4e.httpclient.core.ExceptionHandler; 12 | import org.roussev.http4e.httpclient.core.client.model.ItemModel; 13 | import org.roussev.http4e.httpclient.core.client.model.ModelEvent; 14 | import org.roussev.http4e.httpclient.core.client.view.FolderView; 15 | import org.roussev.http4e.httpclient.core.util.BaseUtils; 16 | import org.roussev.http4e.httpclient.core.util.ResourceUtils; 17 | import org.roussev.http4e.httpclient.ui.HdViewPart; 18 | 19 | public class ExportRubyAction extends Action { 20 | 21 | private ViewPart view; 22 | private Menu fMenu; 23 | 24 | 25 | public ExportRubyAction( ViewPart view) { 26 | this.view = view; 27 | fMenu = null; 28 | setToolTipText("Export call as Ruby"); 29 | setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.RUBY))); 30 | setText(" Ruby"); 31 | } 32 | 33 | 34 | public void dispose(){ 35 | // action is reused, can be called several times. 36 | if (fMenu != null) { 37 | fMenu.dispose(); 38 | fMenu = null; 39 | } 40 | } 41 | 42 | 43 | // protected void addActionToMenu( Menu parent, Action action){ 44 | // ActionContributionItem item = new ActionContributionItem(action); 45 | // item.fill(parent, -1); 46 | // } 47 | 48 | public void run(){ 49 | try { 50 | FolderView folderView = ((HdViewPart) view).getFolderView(); 51 | ItemModel iModel = folderView.getModel().getItemModel(new Integer(folderView.getSelectionItemHash())); 52 | iModel.fireExecute(new ModelEvent(ModelEvent.EXPORT, iModel)); 53 | 54 | StringWriter writer = new StringWriter(); 55 | BaseUtils.writeRuby(iModel, writer); 56 | 57 | ExportDialog dialog = new ExportDialog(view, "Ruby Rest Client", 58 | "Your call exported as Ruby Rest Client call.", 59 | writer.toString()); 60 | dialog.open(); 61 | } catch (Exception e) { 62 | ExceptionHandler.handle(e); 63 | } 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/actions/HdActionDelegate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.ui.actions; 17 | 18 | import org.eclipse.jface.action.IAction; 19 | import org.eclipse.jface.viewers.ISelection; 20 | import org.eclipse.ui.IViewActionDelegate; 21 | import org.eclipse.ui.IViewPart; 22 | import org.roussev.http4e.httpclient.core.client.view.FolderView; 23 | import org.roussev.http4e.httpclient.ui.HdViewPart; 24 | 25 | 26 | /** 27 | * Action delegate for all toolbar push-buttons. 28 | * 29 | * @author Atanas Roussev (http://nextinterfaces.com) 30 | */ 31 | public class HdActionDelegate implements IViewActionDelegate { 32 | 33 | public HdViewPart hdPart = null; 34 | 35 | public void init( IViewPart viewPart){ 36 | if (viewPart instanceof HdViewPart) { 37 | this.hdPart = (HdViewPart) viewPart; 38 | } 39 | } 40 | 41 | public void run( IAction action){ 42 | String id = action.getId(); 43 | FolderView folderView = hdPart.getFolderView(); 44 | 45 | if (id.equals("add.tab")) { 46 | folderView.addTab(); 47 | 48 | } else if (id.equals("remove.tab")) { 49 | folderView.removeTab(); 50 | } 51 | } 52 | 53 | /** 54 | * Not implemented. 55 | */ 56 | public void selectionChanged( IAction action, ISelection selection){ 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/actions/HelpAboutAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.ui.actions; 17 | 18 | import org.eclipse.jface.action.Action; 19 | import org.eclipse.ui.part.ViewPart; 20 | 21 | /** 22 | * Action used for the open historical input again in DependenciesView 23 | * 24 | * @author Atanas Roussev (http://nextinterfaces.com) 25 | */ 26 | public class HelpAboutAction extends Action { 27 | 28 | private ViewPart view; 29 | 30 | public HelpAboutAction( ViewPart view, String title) { 31 | super(); 32 | this.view = view; 33 | setText(title); 34 | // setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreImages.HELP))); 35 | // setDisabledImageDescriptor(PDEPluginImages.DESC_PLUGIN_OBJ); 36 | 37 | setDescription(title); 38 | setToolTipText(title); 39 | } 40 | 41 | public void run(){ 42 | AboutDialog dialog = new AboutDialog(view.getViewSite().getShell()); 43 | dialog.open(); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/actions/ImportMenuAction.java: -------------------------------------------------------------------------------- 1 | package org.roussev.http4e.httpclient.ui.actions; 2 | 3 | import org.eclipse.jface.action.Action; 4 | import org.eclipse.jface.action.ActionContributionItem; 5 | import org.eclipse.jface.action.IMenuCreator; 6 | import org.eclipse.swt.widgets.Control; 7 | import org.eclipse.swt.widgets.Menu; 8 | import org.eclipse.ui.part.ViewPart; 9 | 10 | public class ImportMenuAction extends Action implements IMenuCreator { 11 | 12 | private ViewPart view; 13 | private Menu menu; 14 | private Action http4eAction; 15 | private Action liveHeadersAction; 16 | private Action packetAction; 17 | 18 | 19 | public ImportMenuAction( ViewPart view) { 20 | this.view = view; 21 | menu = null; 22 | setToolTipText("Import HTTP packets"); 23 | setMenuCreator(this); 24 | } 25 | 26 | 27 | public void dispose(){ 28 | // action is reused, can be called several times. 29 | if (menu != null) { 30 | menu.dispose(); 31 | menu = null; 32 | } 33 | } 34 | 35 | 36 | public Menu getMenu( Menu parent){ 37 | return null; 38 | } 39 | 40 | 41 | public Menu getMenu( Control parent){ 42 | if (menu != null) { 43 | menu.dispose(); 44 | } 45 | menu = new Menu(parent); 46 | addActionToMenu(menu, getPacketAction()); 47 | addActionToMenu(menu, getHTTP4eAction()); 48 | addActionToMenu(menu, getLiveHeadersAction()); 49 | return menu; 50 | } 51 | 52 | 53 | protected void addActionToMenu( Menu parent, Action action){ 54 | ActionContributionItem item = new ActionContributionItem(action); 55 | item.fill(parent, -1); 56 | } 57 | 58 | 59 | private Action getLiveHeadersAction(){ 60 | if (liveHeadersAction == null) { 61 | liveHeadersAction = new ImportLiveHttpHeadersAction(view); 62 | } 63 | return liveHeadersAction; 64 | } 65 | 66 | 67 | private Action getPacketAction(){ 68 | if (packetAction == null) { 69 | packetAction = new ImportPacketAction(view); 70 | } 71 | return packetAction; 72 | } 73 | 74 | 75 | private Action getHTTP4eAction(){ 76 | if (http4eAction == null) { 77 | http4eAction = new ImportHTTP4eAction(view); 78 | } 79 | return http4eAction; 80 | } 81 | 82 | 83 | public void run(){ 84 | getHTTP4eAction().run(); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/actions/ImportPacketAction.java: -------------------------------------------------------------------------------- 1 | package org.roussev.http4e.httpclient.ui.actions; 2 | 3 | import org.eclipse.jface.action.Action; 4 | import org.eclipse.swt.events.MouseAdapter; 5 | import org.eclipse.swt.events.MouseEvent; 6 | import org.eclipse.swt.widgets.Menu; 7 | import org.eclipse.ui.part.ViewPart; 8 | import org.roussev.http4e.httpclient.core.ExceptionHandler; 9 | import org.roussev.http4e.httpclient.core.client.model.Item; 10 | import org.roussev.http4e.httpclient.core.client.model.ItemModel; 11 | import org.roussev.http4e.httpclient.core.client.view.FolderView; 12 | import org.roussev.http4e.httpclient.core.util.Translator; 13 | import org.roussev.http4e.httpclient.ui.HdViewPart; 14 | 15 | public class ImportPacketAction extends Action { 16 | 17 | private ViewPart view; 18 | private Menu fMenu; 19 | 20 | 21 | public ImportPacketAction( ViewPart view) { 22 | this.view = view; 23 | fMenu = null; 24 | setToolTipText("Import raw HTTP packet"); 25 | setText("Import raw HTTP packet"); 26 | } 27 | 28 | 29 | public void dispose(){ 30 | // action is reused, can be called several times. 31 | if (fMenu != null) { 32 | fMenu.dispose(); 33 | fMenu = null; 34 | } 35 | } 36 | 37 | public void run(){ 38 | 39 | try { 40 | 41 | final ImportDialog dialog = new ImportDialog(view); 42 | MouseAdapter okListener = new MouseAdapter() { 43 | 44 | public void mouseUp( MouseEvent e){ 45 | Item item = new Item(); 46 | try { 47 | item = Translator.httppacketToItem(dialog.getText()); 48 | 49 | } catch (Exception exc) { 50 | exc.printStackTrace(); 51 | } 52 | 53 | FolderView folderView = ((HdViewPart) view).getFolderView(); 54 | ItemModel iModel = new ItemModel(folderView.getModel(), item); 55 | HdViewPart hdViewPart = (HdViewPart) view; 56 | hdViewPart.getFolderView().buildTab(iModel); 57 | } 58 | }; 59 | dialog.setOkListener(okListener); 60 | dialog.open(); 61 | 62 | } catch (Exception e) { 63 | ExceptionHandler.handle(e); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/actions/ProxyAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.ui.actions; 17 | 18 | import org.eclipse.jface.action.Action; 19 | import org.roussev.http4e.httpclient.core.ExceptionHandler; 20 | import org.roussev.http4e.httpclient.ui.HdViewPart; 21 | 22 | public class ProxyAction extends Action { 23 | 24 | private HdViewPart view; 25 | 26 | 27 | public ProxyAction( HdViewPart view) { 28 | super(); 29 | this.view = view; 30 | setText("Proxy Connection"); 31 | setDescription("Proxy Connection"); 32 | setToolTipText("Proxy Connection"); 33 | } 34 | 35 | 36 | public void run(){ 37 | try { 38 | ProxyDialog dialog = new ProxyDialog(view); 39 | dialog.open(); 40 | } catch (Exception e) { 41 | ExceptionHandler.handle(e); 42 | } 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/actions/TabCloseAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.ui.actions; 17 | 18 | import org.eclipse.jface.action.Action; 19 | import org.roussev.http4e.httpclient.core.client.view.FolderView; 20 | import org.roussev.http4e.httpclient.ui.HdViewPart; 21 | 22 | public class TabCloseAction extends Action { 23 | 24 | private HdViewPart view; 25 | 26 | public TabCloseAction( HdViewPart view) { 27 | super(); 28 | this.view = view; 29 | setText("Close all tabs tab"); 30 | setDescription("Close tab"); 31 | setToolTipText("Close tab"); 32 | } 33 | 34 | public void run(){ 35 | FolderView folderView = view.getFolderView(); 36 | if(folderView.getModel().getItemCount() > 1){ 37 | folderView.removeTab(); 38 | } 39 | } 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/preferences/PreferenceConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.ui.preferences; 17 | 18 | public class PreferenceConstants { 19 | 20 | public static final String P_PROXY_LIST = "proxylist"; 21 | public static final String P_KEYSTORE_LIST = "keystorelist"; 22 | public static final String P_USER_HOME_DIR = "user.folder"; 23 | public static final String P_PAYLOAD_VIEW_SIZE = "payload.view.size"; 24 | } 25 | -------------------------------------------------------------------------------- /http4e-Plugin/src/app/org/roussev/http4e/httpclient/ui/preferences/PreferenceInitializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Eclipse HttpClient (http4e) http://nextinterfaces.com 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.roussev.http4e.httpclient.ui.preferences; 17 | 18 | import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; 19 | import org.eclipse.jface.preference.IPreferenceStore; 20 | import org.roussev.http4e.httpclient.ui.HdPlugin; 21 | 22 | /** 23 | * @author andreaszbschmidt 24 | * 25 | */ 26 | public class PreferenceInitializer extends AbstractPreferenceInitializer { 27 | 28 | /* 29 | * (non-Javadoc) 30 | * 31 | * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences() 32 | */ 33 | public void initializeDefaultPreferences(){ 34 | IPreferenceStore store = HdPlugin.getDefault().getPreferenceStore(); 35 | store.setDefault(PreferenceConstants.P_PROXY_LIST, ""); 36 | // store.setDefault(PreferenceConstants.P_KEYSTORE_LIST, ""); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /http4e-Site/category.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /http4e-Site/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | http4e 6 | org.nodeclipse 7 | 5.0.12-SNAPSHOT 8 | 9 | http4e.site 10 | eclipse-repository 11 | http4e :: update site 12 | 13 | -------------------------------------------------------------------------------- /site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | HTTP4e 9 | ==== 10 | 11 | HTTP4e is an Eclipse HTTP Client plugin simplifying REST and Web Service testing, enabling developer to make HTTP packets directly from Eclipse. The packets include all HTTP requests, responses and the HTTP headers (which contain the cookies and caching information). It is a useful tool for HTTP header tampering and hacking, allowing HTTP code generation to a programming language of choice, as well as JMeter load testing. 12 | 13 | 14 | ### More information 15 | http://nextinterfaces.com/http4e 16 | 17 | 18 | ### Key Features 19 | * Multiple Tabs 20 | * Auto Suggest (CTRL + SPACE) 21 | * Response view format into Raw, Pretty, JSON, HEX, Browser DOM 22 | * SSL/HTTPS and Unicode support 23 | * Basic/Digest authentication 24 | * Proxy support 25 | * Parameterization of Headers/HTTP-Params 26 | * HTTP code export to Java, JavaScript, Prototype, jQuery, Flex, ActionScript, C#, VisualBasic, Ruby, Python, PHP, Cocoa and JMeter 27 | * One click HTML Report generation 28 | * Multipart Form support 29 | 30 | 31 | ### Install URL 32 | http://nextinterfaces.com/http4e/install 33 | 34 | License 35 | -------------- 36 | Apache License v.2.0 37 | 38 | 39 | 40 | 41 | 42 | --------------------------------------------------------------------------------