protected void addAction( JavaClass jclass, JavaMethod initMethod, Element root, boolean withMessage ){
		jclass.addImport(AbstractAction.class);
		jclass.addImport(Action.class);
		jclass.addImport(ActionEvent.class );

		JavaClass actionClass = new JavaClass(AbstractAction.class.getSimpleName());
		
		// JavaMethod constructor = actionClass.getConstructor();
		String tooltipText = Parser.getAttribute(root, TOOLTIP_ATTRIBUTE);
		if( tooltipText != null ){
			addInit(actionClass,"putValue", "Action.SHORT_DESCRIPTION", JavaCode.toParam(tooltipText) );
		}

		String text = getTextAttribute(root);
		if( text != null ){
			StringBuilder realText = new StringBuilder();
			StringBuilder mnemonic = new StringBuilder();
			int pos = getMnemonicInformation( text, realText, mnemonic );
			addInit(actionClass,"putValue", "Action.NAME", JavaCode.toParam(realText.toString()) );
			if( pos >= 0 ){
				addInit(actionClass,"putValue", "Action.MNEMONIC_KEY", mnemonic.toString() );
				addInit(actionClass,"putValue", "Action.DISPLAYED_MNEMONIC_INDEX_KEY", "new Integer(" + pos + ")" );
			}
		}
		
		String icon = Parser.getAttribute(root,"icon");
		if( icon != null ){
			addInit(actionClass,"putValue", "Action.SMALL_ICON", varName + ".getIcon()" );
		}
		
		String shortcut = Parser.getAttribute(root, JMenuItemUI.SHORTCUT_ATTRIBUTE);
		if( shortcut != null ){
			addInit(actionClass, "putValue", "Action.ACCELERATOR_KEY", varName + ".getAccelerator()" );
		}
		
		addActionListener(jclass, actionClass, root, withMessage, varName);
		initMethod.addCall(varName+".setAction", actionClass.toParam() );
		
		//actionVarName = Parser.getUniqueId("action");
		//jclass.addDeclaration( actionVarName, new JavaType(AbstractAction.class.getSimpleName(), JavaType.PRIVATE),  );
	}