templateData.addProperty(reply, nullString);  com.cosylab.vdct.undo.UndoManager.getInstance().addAction( new CreateTemplatePropertyAction(this, reply));  updateTemplateFields(); InspectorManager.getInstance().updateObject(this); unconditionalValidation(); com.cosylab.vdct.events.CommandManager.getInstance().execute("RepaintWorkspace");
if (reply.trim().length()==0) { message = "Empty name! Enter valid name:"; type = JOptionPane.WARNING_MESSAGE; continue; } else if (reply.indexOf(' ')!=-1) { message = "No spaces allowed! Enter valid name:"; type = JOptionPane.WARNING_MESSAGE; continue; } else { templateData.addProperty(reply, nullString);  com.cosylab.vdct.undo.UndoManager.getInstance().addAction( new CreateTemplatePropertyAction(this, reply));  updateTemplateFields(); InspectorManager.getInstance().updateObject(this); unconditionalValidation(); com.cosylab.vdct.events.CommandManager.getInstance().execute("RepaintWorkspace"); }
public void addProperty(){	String message = "Enter property name:";	int type = JOptionPane.QUESTION_MESSAGE;	while (true)	{		String reply = JOptionPane.showInputDialog( null,			                           message,			                           "Add property...",			                           type );		if (reply!=null)		{			if (!templateData.getProperties().containsKey(reply))			{				templateData.addProperty(reply, nullString);				com.cosylab.vdct.undo.UndoManager.getInstance().addAction(						new CreateTemplatePropertyAction(this, reply));				updateTemplateFields();				InspectorManager.getInstance().updateObject(this);				unconditionalValidation();				com.cosylab.vdct.events.CommandManager.getInstance().execute("RepaintWorkspace");			}			else			{				message = "Property '"+reply+"' already exists. Enter other name:";				type = JOptionPane.WARNING_MESSAGE;				continue;			}		}				break;	}}