I made a change in the blogger configuration to ease the later work when blogging. It is possible that older entries are not correctly formatted.

Showing posts with label eclipse. Show all posts
Showing posts with label eclipse. Show all posts

Thursday, 4 July 2013

Eclipse installation Problem onWindows7 with cygwin unzip

Once or twice I had problem using unzip to unpack the eclipse code under windows7. Thanks to this answer, it could start eclipse normally. After downloading eclipse:

$> cd dirtoput-eclipse
$> unzip pathwhere-eclipsezipis/eclipse...-version.zip
$> cd eclipse
$> find . -name "*.dll" -exec chmod +x {} \;

Thursday, 18 February 2010

Eclipse 3.5 Windows and Unicode and Subversion

File.encoding in Eclipse and strange encoding problem in JavaSource UTF-8 files

While trying to deploy the package I have been deploying, a few problem arised yesterday.

We first had checked out a Web application.

Afterwards we set the default encoding to UTF-8 for a few files in the Window > Preferences > General > Content-Type > Text > JSP .

We also changed the encoding in the eclipse.ini file, adding the following line to the java command -Dfile.encoding=UTF-8 in the eclipse.ini

We had strange text where umlauts had been destroyed. The text was in UTF-8 in UTF-8 files in the JavaSource directory. By Debugging, we discovered that they were also called by UTF-8 JSP or UTF-8 Java Files.

The solution has been to check the Application again. Afterwards the text was displayed correctly

Subversion problem while checking files with same names with different Case

The other problem we had, was caused by two files having the same names but with different case: file.jsp and File.jsp. This caused some kind of conflict when checking the file out with subclipse.

Monday, 15 February 2010

Adding .inc as content Type under eclipse

After spending much time looking for the place of the configuration for adding .inc as possible types for files in eclipse, I had to ask a friend again. So here is the place where you do it in Galileo: Window > Preferences > General > Content Types Choose Text > JSP > JSP Fragment And add *.inc to the list of files. You probably also should set the Default encoding.

Thursday, 14 January 2010

Coole Eclipse Shortcuts

I found this link on http://viralpatel.net/blogs/2009/07/20-very-useful-eclipse-ide-shortcuts-for-developers.html.

I found the following shortcuts really great:

# Alt + Shift + L : Extract to Local Variable

Say you have the following method:

public void myTest(){ String finalVariable = "first part" + "second part"+ "third part"; }

if you select "first part" + "second part" and use the short cut :

Alt + Shift + L : Extract to Local Variable

Then eclipse ask for the name of the new local variable, e.g firstTwoParts, and the method looks like:

public void myTest(){
  String firstTwoParts = "first part" + "second part";
  String finalVariable = firstTwoParts + "third part";
}

# Alt + Shift + M : Extract to Method

The same also works with methods. Say you have the following method:

public final static void main(String[] args){
  if (args.length >2){
   System.out.println(args[0]);
   System.out.println(args[1]);
  }
}
if you select the whole if statement up to the }, and use the shortcut: Alt + Shift + M eclipse prompts for the name of the method and creates the parameter, for args.

# Alt + Shift + W : show the class in the package view.

Well I did not know that. But this is very useful, because I often need it.

# Ctrl+Q : Last edit

There is also a button to find this. But a short cut is even better.

# Alt + Left or Alt + Right : Navigate Left and Right

I knew this one but this is also very useful, since it is much quicker than using the mouse every time.

Java scrapbook page

I discovered the java scrapbook page. Which allows you to try simple snippets of code very easily. I should try that. It is really cool.

Myllyn WikiText - Edit documentation easily for different formats

I just discovered that there is in the Eclipse Galileo a very easy and simple way to edit documentation called Wikitext. Documentation for this can be found in the eclipse documentation. Try it. It is just great.

It is in that way possible to use a WikiText format (out of a choice of 3 or 4 different one to write documentation. This Wikitext cabn be then used to generate html or docbook format. This is therefore very useful to create documentation.

See more at http://help.eclipse.org/galileo/topic/org.eclipse.mylyn.wikitext.help.ui/help/Mylyn%20WikiText%20User%20Guide.html

Thursday, 7 January 2010

The long way to a maveniozed Eclipse: M2Eclipse

I had some trouble installing everything for M2Eclipse. One part of the problem was that the fedora installation from eclipse did not really allow the installation of the correct packages. I used the description found in the free online book documenting M2: Developing with Eclipse and Maven.

Therefore, I downloaded the new eclipse from the web site and then I could install subclipse, AJDT and WST as needed. Though WST should have been there since it was the JEE version of eclipse.

Then I could install M2 from the http://m2eclipse.sonatype.org/update/ site.

It is interesting to have the poms. But since the poms are a little complex, I generate them from a more simple xml file. And these XML files can be generated using an even more simple XML file (though this is not yet finished). The goal is to help the bootstrapping of projects. In a simple manner.

Friday, 5 December 2008

RAP

Well I learnt some things about RAP these days and I recalled a few things about eclipse I had forgotten as well I learnt new ones.

Part of the interesting things are targets in eclipse, which allow you to choose exactly the plugins available to the eclipse platform. This is particularly helpful when some packages conflict with each other.

In the case of RAP, the RCP and RAP plugins seems to have difficulty working together. I must admit though that I do not know what is the issue there.

So expect a RAP intro tutorial and perhaps other issues.