mareshkau's blog

Configure eclipse and subversive under Ubuntu

Problem:

Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386:/usr/lib/xulrunner-addons:/usr/lib/xulrunner-addons:/usr/java/packages/lib/i386:/lib:/usr/lib

Solution
#install libsvn-java
sudo  apt-get install libsvn-java

#add following linies to eclipse.ini

Running eclipse under Mac OS

Solution

#add optiopn to java args
-d32

Problem
java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:197)
	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:174)
	at org.eclipse.swt.internal.C.<clinit>(C.java:21)
	at org.eclipse.swt.internal.cocoa.NSThread.isMainThread(NSThread.java:33)
	at org.eclipse.swt.graphics.Device.<init>(Device.java:116)
	at org.eclipse.swt.widgets.Display.<init>(Display.java:668)

An good usability Example

Search in safary look.
mac os search

Enable IP forwarding under Ubuntu

To enable ip forwarding from one interface to another you can use following commands:

iptables -A FORWARD -i ppp0 -o eth0 -s 192.168.1.0/24 -m conntrack --ctstate NEW -j ACCEPT
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A POSTROUTING -t nat -j MASQUERADE 
sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"

This code anables ip forwarding from eth0 to ppp0 interface-> ie from local network to private network

Integrating maven project into eclipse using m2eclipse and wtp

    To be ablerun maven web project inside eclipse you need install
  • m2eclipse core
  • m2eclipse wtp integration

Switching from one svn working copy to another

To switch you working copy from trunk to branch I recommend do following

#1 copy you working copy, because switching can be painfull
cp -r trunk branch
#2 run svn switch
svn switch https://svn.jboss.org/repos/jbosstools/branch branch

If repository has changed URL you can update localcopy using following command
svn switch --relocate https://old-url http://new-url 3.2.helios/

Usefull Eclipse Plugins for working with big ammount of code

On big project it's necessary to control quality of code and code coverage in testing time.
When amount of code is bigger then couple of classes, it very hard analyse the code manually.
So it's good to use some automatic tools for it. Code coverage and code checkers can be integrated into project build system or can be used as
eclipse plugins.

    For analysing structure of code can be used folowing plugins:
  • Check Style -FULL SHIT BY MY Opinion

New XHTML File Wizard

Here screen shot's of New XHTML Page Wizard
Used Technologies, eclipse-ui, jface, wtp,junit, swtbot
New XHTML Page Wizard Page 1
New XHTML Page Wizard Page 2
New XHTML Page Wizard Page 3
New XHTML Page Wizard Page 4

Visual Page Editor Souce Templates Preference Page

Used technologies: eclipse, jface, wtp

JSF2 Validators in VPE

JSF2 Custom Element Validation has been to JBoss Developer Studio & JBoss Developer Tools

    possibilities of this functionality
  • validation and quick fix for jsf2 components library declaration
  • validation and quick fix for jsf2 custom component name
  • validation and quick fix for jsf2 custom component attributes

You can find more details here
More Information Here
Demo

Syndicate content