How to import Liferay .lpkg theme into Liferay Developer Studio? - liferay-6

I downloaded a Liferay theme from Liferay Marketplace, as a .lpkg file.
I want to modify it a bit.
How can I import it into Liferay Developer Studio?
I tried unzipping it, unzipping the *-theme-*.war inside, copying the folders to the root of a new Liferay theme project, compiling to WAR and copying to Liferay's deploy folder, but no theme appears. The theme appear correctly if I just copy the .lpkg file to deploy.

Related

Create new service builder for liferay with eclipse luna does not work

I am trying to create a new service builder for liferay portly project.
If I open the "new Service Builder" dialog, it is not possible for me to click the finish Button. I tried to do this with the guestbook Portlet example on dev.liferay.com, without success.
Eclipse says that I have to enter a project name. However, it is not possible to enter something at Plugin project. I don't know why; perhaps this is a bug?
I did this several times and it worked, but now I've tried this with a new setup. Perhaps this is the reason.
Setup:
Mac OSX 10.10.4
eclipse Luna 4.4.2
installed Plugins:
Liferay
Git
Maven
Liferay 6.2
How do I make this work?
You're using Liferay IDE, right? (I assume that's what you mean when you say you have Liferay installed as a plugin.)
Maybe with your new setup, Eclipse doesn't recognize your guestbook project as a valid Liferay Plugin project. When you click New -> Liferay Service Builder, you have to select a Liferay Plugin project within which to create the Service Builder stuff. Since you can't select anything at the Plugin project selector, I'd guess that Eclipse doesn't recognize any of your projects as valid Liferay Plugin projects.
Note that if you click New -> Liferay Plugin Project, you have to specify a Liferay Plugins SDK and a Liferay runtime. You need to have both of these configured in your new environment.
For Plugins SDK, go to Eclipse's Preferences Window then Liferay -> Installed Plugin SDKs. Add the Plugins SDK that contains your guestbook project and re-import your guestbook project from this SDK. Then check if the Service Builder wizard lets you select your project via the selector.

Eclipse RCP Plugin does not work outside Eclipse

I am learning the basics of E4 RCP development. I followed the tutorial below to create a basic application and a plugin.
http://www.rcp-vision.com/?p=4972&lang=en
The plugin is included in the dependencies of the .product file.
When I right-click the .product file and run as eclipse application, I can see the application and the plugin, which just adds a new menu item labelled "plugin" to the application.
But when I export the application using Eclipse Product Export Wizard, the exported eclipse.exe only launches the main rcp application without the plugin (because the "plugin" menu item is not present in the GUI). The plugin is available as a .jar file in the plugins folder and it is also included in the osgi.bundles section of the config.ini file.
Why is the exported application not able to find the plugin?
Be sure to include the fragment.e4xmi file in the build.properties file.
When you run within Eclipse everything in the plugin project is available, but when you export a RCP only things listed in the build.properties are available.

Can't chose a Liferay Plugin SDK in Eclipse

I have checked out an existing project from SVN into Eclipse as aLiferay project (in fact the checked in project IS a Liferay project).
The problem is that I get an error:
*No Liferay Plugin SDK configured on project Xxx-portlet.*
Opening the project properties I can see under Liferay menue item that indeed there is no SDK selected. Following the Configure SDKs link I can see an existing installed Liferay Plugin SDK and it's already selected. Clicking OK (even after de- and re-selecting the installed Plugin SDK) the input field remains empty.
How can I assign the Liferay Plugin SDK to the project??
Plugins SDK is an ant-based download that relies on your projects to be in common locations: If you just check out one project, you'll need to have this in a subdirectory of the plugins sdk - e.g. if you are working on a portlet (project name "my-portlet"), this should be located in ${plugins-sdk}/portlets/my-portlet.
In eclipse (or Liferay IDE) you should configure your plugins sdk by naming it and pointing to the root of your sdk folders. Then you can choose to create projects into this sdk (or to import from that SDK)
Note that the sourcecode will be located in the SDK directory, not in the eclipse workspace directory.
This is necessary as IDE relies on the ANT infrastructure to be there and the build.xml files reference common build.xml files in the parent directory. Some build processes in Liferay IDE will trigger ANT.
Liferay IDE 2.0 will also support maven, so this requirement will go away (if you use maven)
Ok! I have to check out the project into the {Liferay Plugin SDK}/portlets folder but not into any other folder.

Installed google plugin for eclipse but see no web application project menu item

I use standalone eclipse on linux. I downloaded it from eclipse site ( not from my distro's repository ) and extracted it to home folder. Installed google plugin for eclipse (using Help->Install New Software). But see no new Web Application Project menu item. When I create new java project, in project properties I can select on Google tab "Use google app engine" checkbox. But I have to create war folder, web.xml, appengine-web.xml, etc. So I want to get new web application project template. How do I turn it on?
You need to be sure that you downloaded "Eclipse IDE for Java EE Developers". Please delete your current Eclipse installation and download a new archive from http://eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigosr2

How to use the Velocity Eclipse plug-in?

I'm trying to create a theme plugin for Liferay with Velocity, but I'm having some problems.
I'v installed the Velocity plug-in to Eclipse from here http://veloedit.sourceforge.net/updates/ . But I cant find it in Eclipse UI. How do I use it to edit Liferay velocity templates? Can you give some examples?
Once you have installed the Velocity plugin, next you need to create your Liferay theme plugin. This can be done with the Liferay Plugins SDK and with the Liferay IDE. Here is a tutorial for how to work with Liferay themes. Once you have created your theme, you can customize any of the existing *.vtl files (velocity templates). You just need to put these under the _diffs folder for the theme project, _diffs/templates. Once you have copied a VTL file into the templates folder, you can edit it, by right-clicking the file in Eclipse and choosing "Open with > Velocity Editor".