Showing posts with label SoftwareEngineering. Show all posts
Showing posts with label SoftwareEngineering. Show all posts

2007/11/05

UML IDE

Best Eclipse UML Plugin to Learn UML - Visual Paradigm SDE Personal Edition for Eclipse
http://www.visual-paradigm.com/product/sde/ec/personaledition.jsp

UMLモデリングプラグイン
http://eclipsewiki.net/eclipse/?UML%A5%E2%A5%C7%A5%EA%A5%F3%A5%B0%A5%D7%A5%E9%A5%B0%A5%A4%A5%F3

アジャイルモデリング(AM)
http://www.ogis-swe.jp/process/am-res/am/artifacts/crcModel.html

2007/11/02

Extreme Programming (XP) Class Responsibility Collaborator (CRC) Cards

Extreme Programming (XP) Class Responsibility Collaborator (CRC) Cards

-----
Class
Responsibility
...
Collaborator
...

-----

Design a Simulator for the Coffee Maker
http://www.extremeprogramming.org/example/crcsim.html

CRC Model
http://www.ogis-swe.jp/process/am-res/am/artifacts/crcModel.html

2007/09/05

CVS-SSH2 Server installation (debian)

CVS-SSH2 Server installation (debian)
Install the CVS server: apt-get install cvs. This will install CVS, the daemon gets started with inetd and the CVS root is by default /var/lib/cvs. By default you can connect to your CVS server via pserver, but you shouldn't use pserver when you set up a public CVS server, as the password gets not encrypted when you log on. I want to create a SSH tunnel to connect the CVS server:

Linux:
Basics: create a CVS user, lets call him cvsuser (quite creative, eh?). Create the file ~/.profile and add this text:

export CVS_RSH=ssh


prepare the SSH-keyfile, create the empty file ~/.ssh/authorized_keys2

Windows:
I use eclipse a my IDE, choose this menu [Window / Preferences / Team / CVS / SSH2 Connection / Key Management] and create the SSH keypair. Paste the public key into the ~/.ssh/authorized_keys2 file and copy the private key to a safe place.

NOTE: I wasn't able to use puttygen generated SSH keys with eclipse, I think this is because putty uses a special private key format eclipse can't use.


Linux:
Restrict shell access:
I don't want that my CVS user can use my server to tunnel connections or use a shell and browse on the server, so I added some basic security features:
Create a file /bin/cvssh, chmod 755 it and add this content:

#!/bin/bash
if [ "$2" != "cvs server" ]; then
echo "Access Denied"
exit 1
fi
cvs server
exit

Edit the file /etc/passwd and change the shell of the cvsuser (usually /bin/bash) to /bin/cvssh. Thanks to novell for this info.

Restrict SSH tunneling:
Edit the file ~/.ssh/authorized_keys2 and add the option no-port-forwarding in front of the public key.

2007/07/17

CVS Setup

install and setup pserver


# check installation and version
rpm -qa | grep cvs
cvs-1.11.1p1-7

# if you hadn't installed cvs or the right version. just install it, or upgrade it.
rpm -ivm cvs-1.11.1p1-7
rpm -Uvm cvs-1.11.1p1-7
rpm -Fvm cvs-1.11.1p1-7

# create user and group for cvsroot user
groupadd -g 502 cvsroot
useradd -u 502 cvsroot -g cvsroot -G cvsroot

# add cvspserver to xinetd.d
cat << EOF > /etc/xinetd.d/cvspserver
service cvspserver
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
env = HOME=
server = /usr/bin/cvs
server_args = -f --allow-root=/home/cvsroot --allow-root=/home/cvsroot0/1 pserver
log_on_failure += USERID
}



setup password


# setup password
touch /home/cvsroot/CVSROOT/passwd

# cvsuseradd.sh - the script for cvsuseradd
perl ./cvsuseradd.pl $1 >> passwd

# cvsuseradd.sh - the script for cvsuseradd
cvsuseradd.sh
perl ./cvsuseradd.pl $1 >> passwd

cvsuseradd.pl
#!/usr/bin/perl

$username = $ARGV[0];
print "\n" . "$username:" . crypt("$username", "SB") . ":cvsroot";

2007/04/17

JavaScript Unit Test

JSUnit
http://www.jsunit.net/

unittest.js of script.aculo.us
http://wiki.script.aculo.us/scriptaculous/show/UnitTesting

jstest.rb

WEBrick

maven ToggleWritePropertiesAction problem with eclipse 3.2

I found that it still does not work even for Eclipse 3.2 final release (aka Callisto). This seems like show stopped for me now!

It says:
Unable to create view: class org.mevenide.ui.eclipse.sync.action.ToggleWritePropertiesAction overrides final method [Æà*(+.ká*(+9

And yields the following stack trace:
java.lang.VerifyError: class org.mevenide.ui.eclipse.sync.action.ToggleWritePropertiesAction overrides final method [Æà*(+.ká*(+9
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:160)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:498)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:468)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:427)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:339)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:391)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:352)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at org.mevenide.ui.eclipse.sync.view.SynchronizationView.createActions(SynchronizationView.java:352)
at org.mevenide.ui.eclipse.sync.view.SynchronizationView.createPartControl(SynchronizationView.java:164)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:332)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:197)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:290)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:525)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:140)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:394)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1144)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1097)
at org.eclipse.ui.internal.PartStack.presentationSelectionChanged(PartStack.java:795)
at org.eclipse.ui.internal.PartStack.access$1(PartStack.java:781)
at org.eclipse.ui.internal.PartStack$1.selectPart(PartStack.java:123)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$1.handleEvent(TabbedStackPresentation.java:126)
at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:267)
at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:276)
at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.access$1(DefaultTabFolder.java:1)
at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$2.handleEvent(DefaultTabFolder.java:84)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:709)
at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3171)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1953)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:288)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

[ Permlink | « Hide ]
Radek Riedel [19/Jul/06 08:51 AM]

I have solved this issue by decompiling ToggleWritePropertiesAction class and reimplemnting it by new eclipse code interface.
Then repacking it into plugin jar and it is working. Unfortunately I dont have time to work on the whole issue so I would like to post what I have done for who ever wants to implement it into next version of mevenide.

Here is the reimplemented class.

package org.mevenide.ui.eclipse.sync.action;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;

public class ToggleWritePropertiesAction extends Action {

public ToggleWritePropertiesAction()
{
super(null, 2);
IPropertyChangeListener listener =
new IPropertyChangeListener() {

public void propertyChange(PropertyChangeEvent event) {
if("checked".equals(event.getProperty()))
{
String tooltip;
if(((Boolean)event.getNewValue()).booleanValue())
{ tooltip = "Donot override project.properties"; // beacause I don have the whole project I dont need the dependecy // but if any one want do compile the right way he should yuse theline below //Mevenide.getResourceString("ToggleWriteProperties.NoOverride"); } else
{ tooltip = "Override project.properties"; // tooltip = Mevenide.getResourceString("ToggleWriteProperties.Override"); }

setToolTipText(tooltip);
}
}
};
addPropertyChangeListener(listener);
}

}