Simple WYSIWYG HTML editpart for eclipse rcp? - html

I am looking for a Eclipse plugin which I could use to provide a WYSIWYG HTML editor in an Eclipse RCP application.
I need nothing fancy, something with similar functionality to the editor I am using to type this question would be sufficient.
Based on the answers to What is the best HTML editor for Eclipse? there should be one provided by the Web Tools Platform project: Web Page Editor. But I could not figure out its class name to use it inside a View.
A small code example on using it would be especially helpful.

Quick tutorial:
In eclipise:
-import project from cvs, host: dev.eclipse.org, repository path:/cvsroot/webtools, user:anonymous, connection type:pserver
-click next, find and choose plugin org.eclipse.jst.pagedesigner and import it to your workspace
-create Hello RCP
-in plugin.xml tab extension add new: org.eclipse.ui.editor
-in this extension point add new element, editor and set: id- no matter what, but remember it for future (e.g. "editorId"), extensions: xml,html,xhtml class:org.eclipse.jst.pagedesigner.editors.HTMLEditor, contributorClass: org.eclipse.jst.pagedesigner.editors.actions.PageDesignerActionBarContributor2, default: false.
-Now you have to open a file, "transform" to IEditorInput
-call method IWorkbenchPage.openEditor(iEditorInput,"editorId")
Should work!

Related

Create Vanila HTML / JS project inside PhpStorm where PHP has already been configured

I use Storm daily for PHP/Laravel, and hence have PHP configured. When I want to create a vanilla HTML / JS side project, Storm takes it upon itself to add the PHP libraries without asking. I don't want any PHP Libraries. When initially creating the project, I used "empty project".
Here is a screen shot to illustrate.
So, how to create an empty project without PHP libraries?
You are using PhpStorm, an IDE that supports PHP. That entry that you see there is a list of stubs for PHP (the stuff that IDE knows about core PHP and other common extensions: classes/functions/constants etc).
AFAIK it always will be there (as it's a PHP oriented IDE) and you cannot remove it. But you try this:
Settings (Preferences on macOS)
Languages & Frameworks | PHP
PHP Runtime tab
Uncheck ALL entries there.
If the above will not get rid of the whole node then you will have to ignore that entry. And I do not see any problems in having it here: it will not affect your JS/HTML in any way.
P.S. Whatever will be in a default/new project can be configured at File | New Projects Settings | Settings for New Projects...

How to view column-aligned CSV files in Visual Studio editor

Opening a .csv file in Visual Studio produces an unreadable jumbled mess. Is there any way to set up Visual Studio to automatically format these files in columns (a "grid-view", so to speak) so I can edit them directly in the IDE? Are there any tricks or workarounds or extensions that could make these files more easily readable?
(VSCode has what looks to be a fantastic extension for this sort of thing, but alas, it won't work in Visual Studio Pro/Enterprise. Also, BeyondCompare4 does this automatically, and Notepad++ has the TextFX plugin which supports this as well. Has no one ever produced such a plugin for VS?)
(UPDATE: I have created a feature request here. Please vote for it if you upvote this ticket.)
You can install csv-viewer extensions by searching for them in the search tool in the VSCode "Extensions" menu.
Some good ones are 'Excel Viewer' by GrapeCity, or 'Edit csv' by janisdd.
Both of these (and many more) allow you to view excel files in columns inside VScode, not just text files as is default.
Without extension, VSCode 1.44 (March 2020) might bring a native answer with:
Custom Text Editors
With custom text editors, extensions can now replace VS Code's standard editor with a custom webview based view for specific text based resources. Potential use case include:
Previewing assets, such as shaders or .obj files.
Creating WYSIWYG editors for markup languages such as XAML.
Providing alternative, interactive views of data files such as json or csv.
The custom editors documentation covers how to use the new custom text editor API and how to make sure your new editor works well with VS Code. Also be sure to check out the custom editors extension sample.
And that comes with:
workbench.editorAssociations setting
Also for custom editor, the new workbench.editorAssociations setting lets you configure which editor is used for a specific resource.
The example below configures all files ending in .catScratch to open using the example custom text editor from our extension samples.
"workbench.editorAssociations": [
{
"viewType": "catCustoms.catScratch",
"filenamePattern": "*.catScratch"
}
]
And:
View: Reopen with
The new View: Reopen with command lets you reopen the currently active file using a different custom editor.
You can use this command to switch between VS Code's standard text editor and the custom editor, or to switch between multiple custom editors for a resource.

PhpStorm - Create normal HTML, JS, CSS project

Is it possible to create a simple Project which only uses HTML, JavaScript and CSS, or do I have to use netbeans?
I tried to start a new project, but I have only these options:
and I am not sure what "HTML5 Boilerplate" is.
Just use the top most "PHP Empty Project" option.
If you do not have local or remote PHP -- just choose <no interpreter> option for "CLI Interpreter" field.
In the end you will get empty project.
Alternative solution:
Create empty project folder using your file manager/terminal.
Using PhpStorm use Open from Welcome screen (or File | Open Directory if you have some project already opened") and point to the project root folder -- IDE will create new project (or reuse existing one (if it finds .idea subfolder)) from those files.
I am not sure what "HTML5 Boilerplate
You may click on blue link on the top right corner of that screen and it will take you to the GitHub page for that project.
From there: https://github.com/h5bp/html5-boilerplate
HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites.
This project is the product of many years of iterative development and combined community knowledge. It does not impose a specific development philosophy or framework, so you're free to architect your code in the way that you want.

ExtendScript plugin for Webstorm or PhPstorm?

when scripting for after effects I often use ExtendScript.
There is an extendscript package available for sublime text out there.
https://sublime.wbond.net/packages/ExtendScript
(this makes it possible to run your script directly from sublime text into after effects)
I was wondering if there is also something like this out there for any JetBrains IDEs (like WebStorm or PhpStorm etc.). I do know it has several plugins in it, but i don't know if there was ever one made for Expendscript like the one for sublime text.
I'm not aware of any... Please see http://devnet.jetbrains.com/message/5496889#5496889 for some hints
To be able to run adobe scripts from WebStorm, you can use external tools (Settings/External tools):
create a new external tool
specify a full path to Adobe tool capable of executing .jsx ("C:\Program Files (x86)\Adobe\Adobe Photoshop CS5\Photoshop.exe", for example) as a 'Program'
add $FileName$ as parameters
set a working directory to $FileDir$
make sure to check Show in/Project views and Editor menu to be able to run your tool from file right-click menu in Project view/Editor
then you'll be able to run your tool from a right-click menu of your .jsx file - the file will be passed to Photoshop as an argument

How do I use phalcon-devtools\ide\phpstorm in phpstorm?

I am trying to integrate the Phalcon developer tools with phpstorm. There is a video here, but I am unable to view it due to my location.
I can't find any other usable reference in the documentation, how can I accomplish this?
Here are the steps.
Make sure you have the phalcon-devtools installed Instructions
Create a project using phalcon-devtools (unless you already have a project)
Launch PHPStorm and create the project there (unless you already did that).
Click File-Settings (Ctrl+Alt+S) (or PHPStorm-Preferences for Mac)
Click the second option "Command Line Tool Support"
Click the + icon and a new popup comes up. Make sure you have "Custom Framework" selected
In the new popup type:
Framework: Phalcon
Tool path: /Applications/MAMP/htdocs/phalcon-tools/ide/phpstorm/phalcon.sh
Alias: phalcon
Description: Phalcon Developer Tools
This assumes that your phalcon-tools have been installed under:
/Applications/MAMP/htdocs/phalcon-tools/
Also if you use a Windows environment, you should use phalcon.bat instead of phalcon.sh (see Tool Path line above)
Click Apply and then OK.
Click Tools - Run Command (Ctrl+Shift+X)
In the Commands output window, type:
phalcon commands
You should be able to see output. If there is an error check your path. Type any of the phalcon-tools commands to generate components for your project.
In PHPStorm you should see in the project explorer "External Libraries". Right mouse click and select "Configure PHP Include Paths"
In the new dialog click the + and navigate to the /Applications/MAMP/htdocs/phalcon-tools/ide/phpstorm/0.5.0 folder and click OK.
Now as you type code, the relevant helper popup will appear with all the relevant functions.
2012-09-07: There is a beta implementation of the Phalcon PHPStorm support for 0.5.0 here. In the upcoming weeks the code will become part of the framework and included with the 0.5.0 version.
I had some problems with the execution of the phalcon.bat file on my Windows Dev machine, no PHP installed, so i research a much simpler solution for phpstorm.
Simply do following:
click on "External Libraries"
click on "Configure PHP Includes Paths..."
click on add
add "phalcon-devtools\ide\[YOUR_VERSION_DIRECTORY]"
Than you have code completion for phalcon:-)
If you see the Phalcon module loaded in phpinfo page in your WAMP server, do the following to get loaded the module in CLI mode too.
Copy <WAMP INSTALATION >\bin\apache\<APACHE VERSION >\bin\php.ini to \bin\php\<PHP VERSION>\
Set php PATH to <WAMP INSTALATION>\bin\php\<PHP VERSION>\
That should solve the problem.
It has since been changed,
"As part of our restructuring and working towards a better more robust framework in terms of features as well as organization, we have removed the IDE stubs from the Phalcon DevTools repository and moved to its own repository."
The new instructions are located here:
https://blog.phalconphp.com/post/phalcon-ide-stubs-repository