You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(16) |
Oct
|
Nov
|
Dec
|
|---|
|
From: <dc...@us...> - 2002-09-14 17:07:44
|
Update of /cvsroot/xmlceclipse/CVSROOT
In directory usw-pr-cvs1:/tmp/cvs-serv29450
Modified Files:
syncmail
Log Message:
Disable syncmail
Index: syncmail
===================================================================
RCS file: /cvsroot/xmlceclipse/CVSROOT/syncmail,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** syncmail 18 Aug 2002 03:05:51 -0000 1.1
--- syncmail 14 Sep 2002 17:07:40 -0000 1.2
***************
*** 71,75 ****
email-addrs
At least one email address.
! """
import os
import sys
--- 71,75 ----
email-addrs
At least one email address.
!
import os
import sys
***************
*** 322,323 ****
--- 322,324 ----
main()
sys.exit(0)
+ """
\ No newline at end of file
|
|
From: <dc...@us...> - 2002-09-08 15:22:31
|
Update of /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.feature
In directory usw-pr-cvs1:/tmp/cvs-serv19486
Added Files:
.project feature.xml
Log Message:
Capabilities where deprecated, at least for a while
--- NEW FILE: .project ---
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>net.sourceforge.xmlceclipse.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>
--- NEW FILE: feature.xml ---
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="net.sourceforge.xmlceclipse.feature"
label="XMLc for Eclipse"
version="0.0.1"
provider-name="XMLC for Eclipse Team"
primary="true">
<requires>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.jdt"/>
<import plugin="org.eclipse.jdt.core"/>
<import plugin="org.eclipse.swt"/>
<import plugin="org.eclipse.ui"/>
</requires>
<plugin
id="net.sourceforge.xmlceclipse"
download-size="0"
install-size="0"
version="0.0.1">
</plugin>
</feature>
|
|
From: <dc...@us...> - 2002-09-08 15:22:28
|
Update of /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net/sourceforge/xmlceclipse/ui/properties
In directory usw-pr-cvs1:/tmp/cvs-serv19441/src/net/sourceforge/xmlceclipse/ui/properties
Added Files:
Widget.java EnabledWidget.java SourceFolderList.java
DomFactory.java JavaSourceFolder.java TextWidget.java
PackagePrefix.java ClassNameTemplate.java
ProjectPropertyPage.java Parser.java
Log Message:
Capabilities where deprecated, at least for a while
--- NEW FILE: Widget.java ---
package net.sourceforge.xmlceclipse.ui.properties;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import net.sourceforge.xmlceclipse.core.XmlcProperties;
import org.eclipse.swt.widgets.Composite;
/**
* @author dcorbin
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
abstract class Widget
{
public interface ChangeListener
{
public void changed();
}
List listeners = new ArrayList();
public void addListener(ChangeListener listener)
{
listeners.add(listener);
}
protected void changed()
{
for (Iterator i = listeners.iterator(); i.hasNext();)
{
ChangeListener listener = (ChangeListener) i.next();
listener.changed();
}
}
abstract void createControl(Composite parent);
abstract void populate(XmlcProperties properties);
abstract void setEnabled(boolean b);
abstract void extract(XmlcProperties properties);
abstract boolean isOk();
}
--- NEW FILE: EnabledWidget.java ---
package net.sourceforge.xmlceclipse.ui.properties;
import net.sourceforge.xmlceclipse.core.XmlcNature;
import net.sourceforge.xmlceclipse.core.XmlcProperties;
import net.sourceforge.xmlceclipse.core.XmlceclipsePlugin;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import sun.security.krb5.internal.crypto.e;
/**
* @author dcorbin
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
class EnabledWidget extends Widget
{
IProject project;
Button button;
public EnabledWidget(IProject project)
{
this.project = project;
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#createControl(Composite)
*/
void createControl(Composite parent)
{
button = new Button(parent, SWT.CHECK);
button.setText("Enable XML Compiler");
GridData checkboxGridData = new GridData();
checkboxGridData.horizontalSpan = 3;
button.setLayoutData(checkboxGridData);
button.addSelectionListener(new SelectionListener()
{
public void widgetDefaultSelected(SelectionEvent e)
{
throw new RuntimeException("Not yet supported");
}
public void widgetSelected(SelectionEvent e)
{
changed();
}
});
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#populate(XmlcProperties)
*/
void populate(XmlcProperties properties)
{
try
{
button.setSelection(project.hasNature(XmlcNature.NATURE_ID));
}
catch(CoreException e)
{
XmlceclipsePlugin.getDefault().getLog().log(e.getStatus());
}
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#setEnabled(boolean)
*/
void setEnabled(boolean b)
{
button.setEnabled(true);
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#extract(XmlcProperties)
*/
void extract(XmlcProperties properties)
{
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#isOk()
*/
boolean isOk()
{
return true;
}
public boolean getSelection() { return button.getSelection(); }
}
--- NEW FILE: SourceFolderList.java ---
package net.sourceforge.xmlceclipse.ui.properties;
import java.util.Iterator;
import net.sourceforge.xmlceclipse.core.XmlcProperties;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
/**
* @author dcorbin
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
class SourceFolderList extends Widget
{
private Composite buttonStack;
private Button newFolderButton;
private Button removeFolderButton;
private List srcFolderList;
private Label srcDirLabel;
private static int GRID_COLUMNS=3;
private IProject project;
public SourceFolderList(IProject project)
{
this.project = project;
}
private void createSourceList(Composite page)
{
srcDirLabel = new Label(page, SWT.NONE);
srcDirLabel.setText("Source Directories:");
GridData labelData = new GridData();
labelData.horizontalSpan = GRID_COLUMNS;
srcDirLabel.setLayoutData(labelData);
srcFolderList = new List(page, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER);
srcFolderList.addSelectionListener(new SelectionListener()
{
public void widgetDefaultSelected(SelectionEvent e)
{
throw new RuntimeException("Not yet supported");
}
public void widgetSelected(SelectionEvent e)
{
changed();
}
});
}
private Button createButton(Composite parent, String label)
{
Button button = new Button(parent, SWT.PUSH);
button.setText(label);
GridData data = new GridData(GridData.FILL_HORIZONTAL);
button.setLayoutData(data);
return button;
}
private void buildButtonStack(final Composite page)
{
buttonStack = new Composite(page, SWT.NONE);
GridData buttonStackData = new GridData(GridData.FILL_VERTICAL);
buttonStackData.verticalAlignment = GridData.BEGINNING;
buttonStack.setLayoutData(buttonStackData);
GridLayout buttonStackLayout = new GridLayout(1, true);
buttonStack.setLayout(buttonStackLayout);
buttonStackLayout.marginWidth = 0;
newFolderButton = createButton(buttonStack, "Add Folder...");
newFolderButton.addSelectionListener(new SelectionAdapter()
{
public void widgetDefatulSelected(SelectionEvent e)
{
throw new RuntimeException("Not yet supported");
}
public void widgetSelected(SelectionEvent e)
{
InputDialog dlg = new InputDialog(page.getParent().getShell(), "Add XML Compiler Source folder", "", "", new FolderValidator("Source Folder"));
if (dlg.open() == dlg.OK)
{
srcFolderList.add(dlg.getValue());
changed();
}
}
});
new Label(buttonStack, SWT.NONE);
removeFolderButton = createButton(buttonStack, "Remove");
removeFolderButton.addSelectionListener(new SelectionAdapter()
{
public void widgetDefatulSelected(SelectionEvent e)
{
throw new RuntimeException("Not yet supported");
}
public void widgetSelected(SelectionEvent e)
{
int[] indices = srcFolderList.getSelectionIndices();
srcFolderList.remove(indices);
changed();
}
});
}
public class FolderValidator implements IInputValidator
{
String subject = "";
public FolderValidator(String subject)
{
this.subject = subject;
}
public String isValid(String newText)
{
IPath path = new Path(newText);
if (path.segmentCount() == 0)
return null;
if (path.segment(0).equals(project.getName()))
{
return null;
}
return subject + " must begin with the project name (" + project.getName() + ")";
}
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#createControl(Composite)
*/
void createControl(Composite parent)
{
createSourceList(parent);
buildButtonStack(parent);
GridData listData = new GridData(GridData.FILL_BOTH);
listData.horizontalSpan = GRID_COLUMNS - 1;
srcFolderList.setLayoutData(listData);
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#populate(XmlcProperties)
*/
void populate(XmlcProperties properties)
{
java.util.List list = properties.getSourceFolders();
for (Iterator i = list.iterator(); i.hasNext();)
{
String folder = (String) i.next();
srcFolderList.add(folder);
}
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#setEnabled(boolean)
*/
void setEnabled(boolean b)
{
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#extract(XmlcProperties)
*/
void extract(XmlcProperties properties)
{
String[] folders = srcFolderList.getItems();
properties.setSourceFolders(folders);
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#isOk()
*/
boolean isOk()
{
return srcFolderList.getItemCount() > 0;
}
}
--- NEW FILE: DomFactory.java ---
package net.sourceforge.xmlceclipse.ui.properties;
import net.sourceforge.xmlceclipse.core.XmlcProperties;
/**
* @author dcorbin
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
class DomFactory extends TextWidget
{
/**
* @see net.sourceforge.xmlceclipse.ui.properties.TextWidget#label()
*/
protected String label()
{
return "DOM Factory class";
}
/**
* @see net.sourceforge.xmlceclipse.ui.properties.Widget#populate(XmlcProperties)
*/
void populate(XmlcProperties properties)
{
text.setText(properties.getDomFactory());
}
/**
* @see net.sourceforge.xmlceclipse.ui.properties.Widget#extract(XmlcProperties)
*/
void extract(XmlcProperties properties)
{
properties.setDomFactory(text.getText());
}
}
--- NEW FILE: JavaSourceFolder.java ---
package net.sourceforge.xmlceclipse.ui.properties;
import net.sourceforge.xmlceclipse.core.XmlcProperties;
/**
* @author dcorbin
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
class JavaSourceFolder extends TextWidget
{
/**
* @see net.sourceforge.xmlceclipse.ui.TextWidget#label()
*/
protected String label()
{
return "&Java Source Folder";
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#populate(XmlcProperties)
*/
public void populate(XmlcProperties properties)
{
text.setText(properties.getJavaSourceFolder());
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#extract(XmlcProperties)
*/
public void extract(XmlcProperties properties)
{
properties.setJavaSourceFolder(text.getText());
}
}
--- NEW FILE: TextWidget.java ---
package net.sourceforge.xmlceclipse.ui.properties;
import net.sourceforge.xmlceclipse.core.XmlcProperties;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
/**
* @author dcorbin
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
abstract class TextWidget extends Widget
{
protected Label label;
protected Text text;
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#createControl(Composite)
*/
public void createControl(Composite parent)
{
createLabeledTextBox(parent,label(), true);
}
abstract protected String label();
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#setEnabled(boolean)
*/
public void setEnabled(boolean b)
{
label.setEnabled(b);
text.setEnabled(b);
}
private Text createLabeledTextBox(Composite parent, String labelText, boolean filler)
{
label = new Label(parent, SWT.NONE);
label.setText(labelText);
text = new Text(parent, SWT.SINGLE | SWT.BORDER);
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.widthHint = 300;
text.setLayoutData(gridData);
text.addModifyListener(new ModifyListener()
{
public void modifyText(ModifyEvent event)
{
changed();
}
});
if (filler)
new Label(parent, SWT.NONE);
return text;
}
public boolean isOk()
{
return text.getText().length() > 0;
}
}
--- NEW FILE: PackagePrefix.java ---
package net.sourceforge.xmlceclipse.ui.properties;
import net.sourceforge.xmlceclipse.core.XmlcProperties;
/**
* @author dcorbin
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
class PackagePrefix extends TextWidget
{
protected String label()
{
return "&Package Prefix:";
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#populate(XmlcProperties)
*/
public void populate(XmlcProperties properties)
{
text.setText(properties.getPackagePrefix());
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#extract(XmlcProperties)
*/
public void extract(XmlcProperties properties)
{
properties.setPackagePrefix(text.getText());
}
}
--- NEW FILE: ClassNameTemplate.java ---
package net.sourceforge.xmlceclipse.ui.properties;
import net.sourceforge.xmlceclipse.core.XmlcProperties;
/**
* @author dcorbin
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
public class ClassNameTemplate extends TextWidget
{
/**
* @see net.sourceforge.xmlceclipse.ui.TextWidget#label()
*/
protected String label()
{
return "Class Name Template";
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#populate(XmlcProperties)
*/
public void populate(XmlcProperties properties)
{
text.setText(properties.getClassNameTemplate());
}
/**
* @see net.sourceforge.xmlceclipse.ui.Widget#extract(XmlcProperties)
*/
public void extract(XmlcProperties properties)
{
properties.setClassNameTemplate(text.getText());
}
}
--- NEW FILE: ProjectPropertyPage.java ---
/*
* Copyright (c) 2002 David Corbin and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU General Public License v2
* which accompanies this distribution, and is available at
* http://www.gnu.org/copyleft/gpl.html
*
* Contributors:
* David Corbin - Initial implementation.
*/
package net.sourceforge.xmlceclipse.ui.properties;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import net.sourceforge.xmlceclipse.core.XmlcNature;
import net.sourceforge.xmlceclipse.core.XmlcProperties;
import net.sourceforge.xmlceclipse.core.XmlceclipsePlugin;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbenchPropertyPage;
import org.eclipse.ui.dialogs.ContainerSelectionDialog;
import org.eclipse.ui.dialogs.PropertyPage;
/**
* @author dcorbin
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
public class ProjectPropertyPage extends PropertyPage implements IWorkbenchPropertyPage
{
XmlcProperties properties;
private EnabledWidget enabledWidget;;
private Composite page;
private Collection widgets = new ArrayList();
private boolean canLeave = false;
public boolean okToLeave()
{
return canLeave;
}
private void setControlStatus()
{
if (!update)
return;
boolean enabled = enabledWidget.getSelection();
for (Iterator i = widgets.iterator(); i.hasNext();)
{
Widget widget = (Widget) i.next();
widget.setEnabled(enabled);
}
canLeave = true;
if (enabled)
{
for (Iterator i = widgets.iterator(); canLeave && i.hasNext();)
{
Widget widget = (Widget) i.next();
canLeave = canLeave && widget.isOk();
}
}
setValid(canLeave);
}
private boolean update = true;
/**
* @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
*/
final static public int GRID_COLUMNS = 3;
protected Control createContents(final Composite parent)
{
IAdaptable adaptable = getElement();
IResource resource = (IResource)adaptable.getAdapter(IResource.class);
properties = XmlceclipsePlugin.getDefault().getProperties(resource);
page = new Composite(parent, SWT.NONE);
GridLayout pageLayout = new GridLayout(GRID_COLUMNS, false);
page.setLayout(pageLayout);
widgets.add( enabledWidget = new EnabledWidget(getProject()));
widgets.add (new SourceFolderList(getProject()));
widgets.add (new JavaSourceFolder());
widgets.add (new ClassNameTemplate());
widgets.add (new PackagePrefix());
widgets.add (new Parser());
widgets.add (new DomFactory());
for (Iterator i = widgets.iterator(); i.hasNext();)
{
Widget widget = (Widget) i.next();
widget.createControl(page);
widget.populate(properties);
}
Widget.ChangeListener changeListener = new Widget.ChangeListener()
{
public void changed()
{
setControlStatus();
}
};
for (Iterator i = widgets.iterator(); i.hasNext();)
{
Widget widget = (Widget) i.next();
widget.addListener(changeListener);
}
page.layout();
setControlStatus();
return page;
}
private IProject getProject()
{
return (IProject) getElement().getAdapter(IProject.class);
}
/**
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
*/
public boolean performOk()
{
try
{
if (enabledWidget.getSelection() != getProject().hasNature(XmlcNature.NATURE_ID))
{
if (enabledWidget.getSelection())
XmlcNature.addNatureToProject(getProject());
else
XmlcNature.removeNatureFromProject(getProject());
}
if (enabledWidget.getSelection())
{
for (Iterator i = widgets.iterator(); i.hasNext();)
{
Widget widget = (Widget) i.next();
widget.extract(properties);
}
}
else
{
properties.setSourceFolders(null);
properties.setJavaSourceFolder(null);
properties.setPackagePrefix(null);
properties.setClassNameTemplate(null);
}
XmlceclipsePlugin.getDefault().storeProperties(
(IResource)getElement().getAdapter(IResource.class),properties);
return super.performOk();
}
catch (CoreException ce)
{
ErrorDialog.openError(null, "Error saving XMLC properties for project", ce.getMessage(), ce.getStatus());
return false;
}
}
}
--- NEW FILE: Parser.java ---
package net.sourceforge.xmlceclipse.ui.properties;
import net.sourceforge.xmlceclipse.core.XmlcProperties;
/**
* @author dcorbin
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
class Parser extends TextWidget
{
/**
* @see net.sourceforge.xmlceclipse.ui.properties.TextWidget#label()
*/
protected String label()
{
return "Markup Language Parser";
}
/**
* @see net.sourceforge.xmlceclipse.ui.properties.Widget#populate(XmlcProperties)
*/
void populate(XmlcProperties properties)
{
text.setText(properties.getMarkupLanguageParser());
}
/**
* @see net.sourceforge.xmlceclipse.ui.properties.Widget#extract(XmlcProperties)
*/
void extract(XmlcProperties properties)
{
properties.setMarkupLanguageParser(text.getText());
}
public boolean isOk()
{
if (super.isOk())
{
String parser = text.getText();
return "xerces".equals(parser)
|| "jtidy".equals(parser)
|| "swing".equals(parser);
}
return false;
}
}
|
|
From: <dc...@us...> - 2002-09-08 15:22:28
|
Update of /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net/sourceforge/xmlceclipse/core In directory usw-pr-cvs1:/tmp/cvs-serv19441/src/net/sourceforge/xmlceclipse/core Added Files: ProjectPropertyGroup.java XmlcNature.java XmlcProperties.java XmlceclipsePlugin.java XmlcBuilder.java XmlcCapabilityWizard.java Log Message: Capabilities where deprecated, at least for a while --- NEW FILE: ProjectPropertyGroup.java --- /* * Copyright (c) 2002 David Corbin and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU General Public License v2 * which accompanies this distribution, and is available at * http://www.gnu.org/copyleft/gpl.html * * Contributors: * David Corbin - Initial implementation. */ package net.sourceforge.xmlceclipse.core; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.Reader; import java.io.Writer; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.ui.IMemento; import org.eclipse.ui.WorkbenchException; import org.eclipse.ui.XMLMemento; public class ProjectPropertyGroup { Map resourceProperties; IProject project; /** * Constructor ProjectPropertyGroup. * @param iProject */ public ProjectPropertyGroup(IProject project) { this.project = project; resourceProperties = new HashMap(); loadProperties(); } private void savePropertyFile() throws IOException { try { String fileName = getFileName(); XMLMemento rootXml = XMLMemento.createWriteRoot("xmlc"); for (Iterator i = resourceProperties.keySet().iterator(); i.hasNext(); ) { String resourcePath = (String)i.next(); XmlcProperties properties = (XmlcProperties)resourceProperties.get(resourcePath); IMemento xml = rootXml.createChild("resource",resourcePath); xml.createChild("javaSourceFolder").putTextData(properties.getJavaSourceFolder()); xml.createChild("classNameTemplate").putTextData(properties.getClassNameTemplate()); xml.createChild("packagePrefix").putTextData(properties.getPackagePrefix()); xml.createChild("domFactory").putTextData(properties.getDomFactory()); xml.createChild("markupLanguageParser").putTextData(properties.getMarkupLanguageParser()); IMemento sourceFoldersXml = xml.createChild("sourceFolders"); for (Iterator f = properties.getSourceFolders().iterator(); f.hasNext(); ) { String folder = (String)f.next(); sourceFoldersXml.createChild("sourceFolder").putTextData(folder); } } Writer writer = new FileWriter(getFileName()); rootXml.save(writer); } catch(NullPointerException ne) { ne.printStackTrace(); } } public void setProperties(IResource resource, XmlcProperties properties) throws IOException { resourceProperties.put(resource.getFullPath().toString(),properties); savePropertyFile(); } private String getFileName() { IPath path = project.getLocation(); path = path.append(".xmlc"); return path.toOSString(); } private Reader getPropertiesFileReader() throws java.io.IOException { return new FileReader(getFileName()); } private void loadResourceProperties(IMemento xml) { XmlcProperties properties = new XmlcProperties(); String resourceId = xml.getID(); properties.setClassNameTemplate(xml.getChild("classNameTemplate").getTextData()); properties.setJavaSourceFolder(xml.getChild("javaSourceFolder").getTextData()); properties.setPackagePrefix(xml.getChild("packagePrefix").getTextData()); properties.setDomFactory(xml.getChild("domFactory").getTextData()); properties.setMarkupLanguageParser(xml.getChild("markupLanguageParser").getTextData()); IMemento[] sourceFolders = xml.getChild("sourceFolders").getChildren("sourceFolder"); String [] folders = new String[sourceFolders.length]; for (int i=0; i<sourceFolders.length; i++) { folders[i] = sourceFolders[i].getTextData(); } properties.setSourceFolders(folders); resourceProperties.put(resourceId,properties); } private void loadProperties() { try { Reader reader = getPropertiesFileReader(); IMemento root = XMLMemento.createReadRoot(reader); IMemento[] mementos = root.getChildren("resource"); for (int i=0; i<mementos.length; i++) { loadResourceProperties(mementos[i]); } } catch (WorkbenchException e) { XmlceclipsePlugin.getDefault().getLog().log(e.getStatus()); } catch (FileNotFoundException e) { } catch (IOException e) { XmlceclipsePlugin.getDefault().getLog().log( new Status(IStatus.ERROR,XmlceclipsePlugin.PLUGIN_ID,-1, e.getMessage(),e)); } } public XmlcProperties getProperty(IResource resource) { IPath path = resource.getFullPath(); XmlcProperties properties = (XmlcProperties)resourceProperties.get(resource.getFullPath().toString()); if (properties != null) return properties; if (resource == resource.getProject()) { properties = XmlcProperties.getDefault(resource); return properties; } return getProperty(resource.getParent()); } } --- NEW FILE: XmlcNature.java --- /* * Copyright (c) 2002 David Corbin and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU General Public License v2 * which accompanies this distribution, and is available at * http://www.gnu.org/copyleft/gpl.html * * Contributors: * David Corbin - Initial implementation. */ package net.sourceforge.xmlceclipse.core; import net.sourceforge.xmlceclipse.core.util.CoreUtil; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; import org.eclipse.core.resources.IProjectNature; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; public class XmlcNature implements IProjectNature { public static final String NATURE_ID = "net.sourceforge.xmlceclipse.xmlcNature"; IProject project; /** * @see org.eclipse.core.resources.IProjectNature#configure() */ public void configure() throws CoreException { XmlcBuilder.addBuilderToProject(project); } /** * @see org.eclipse.core.resources.IProjectNature#deconfigure() */ public void deconfigure() throws CoreException { } /** * @see org.eclipse.core.resources.IProjectNature#getProject() */ public IProject getProject() { return project; } /** * @see org.eclipse.core.resources.IProjectNature#setProject(IProject) */ public void setProject(IProject project) { this.project = project; } public static void addNatureToProject(IProject project) throws CoreException { if (project.hasNature(NATURE_ID)) throw new CoreException(new Status(0,XmlceclipsePlugin.PLUGIN_ID,0,"Can't add nature twice",null)); CoreUtil.valdateEditProject(project); IProjectDescription description = project.getDescription(); String[] natures = description.getNatureIds(); String[] newNatures = new String[natures.length + 1]; System.arraycopy(natures, 0, newNatures, 0, natures.length); newNatures[natures.length] = NATURE_ID; // Appears to be a bug deep in the API related to this. // validateNatureSet(project, newNatures); { description.setNatureIds(newNatures); project.setDescription(description, null); return; } } public static void removeNatureFromProject(IProject project) throws CoreException { if (!project.hasNature(NATURE_ID)) throw new CoreException(new Status(0,XmlceclipsePlugin.PLUGIN_ID,0,"Can't remove non-existant nature",null)); CoreUtil.valdateEditProject(project); IProjectDescription description = project.getDescription(); String[] natures = description.getNatureIds(); String[] newNatures = new String[natures.length - 1]; int ii=0; for (int i=0; i<natures.length; i++) { if (natures[i].equals(NATURE_ID)) continue; newNatures[ii++] = natures[i]; } validateNatureSet(project, newNatures); description.setNatureIds(newNatures); project.setDescription(description, null); return; } private static void validateNatureSet(IProject project, String[] newNatures) throws CoreException { IStatus status = project.getWorkspace().validateNatureSet(newNatures); if (status.getSeverity() != IStatus.OK) throw new CoreException(status); } } --- NEW FILE: XmlcProperties.java --- /* * Copyright (c) 2002 David Corbin and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU General Public License v2 * which accompanies this distribution, and is available at * http://www.gnu.org/copyleft/gpl.html * * Contributors: * David Corbin - Initial implementation. */ package net.sourceforge.xmlceclipse.core; import java.util.ArrayList; import java.util.List; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; public class XmlcProperties { private String packagePrefix; private String javaSourceFolder; private String classNameTemplate; private String markupLanguageParser; private String domFactory; private List sourceFolders; public XmlcProperties() { } private static String convertToPackage(IPath path) { StringBuffer buffer = new StringBuffer(); String packageSeparator = ""; for (int i=0; i<path.segmentCount(); i++) { buffer.append(packageSeparator); buffer.append(path.segment(i)); packageSeparator = "."; } return buffer.toString(); } public static XmlcProperties getDefault(IResource resource) { IProject project = (IProject)resource.getAdapter(IProject.class); if (project != null) { XmlcProperties properties = new XmlcProperties(); properties.setClassNameTemplate("@Html"); properties.setJavaSourceFolder(project.getFullPath().append("xmlc-java").toString()); properties.setPackagePrefix(convertToPackage(project.getFullPath())); properties.setMarkupLanguageParser("xerces"); properties.setSourceFolders(new String[] { project.getFullPath().append("xmlc").toString() }); properties.setDomFactory("org.enhydra.xml.xhtml.XHTMLDomFactory"); return properties; } return null; } public void setSourceFolders(String[] folders) { sourceFolders = new ArrayList(folders.length); for (int i=0; i<folders.length; i++) { sourceFolders.add(folders[i]); } } public List getSourceFolders() { return sourceFolders; } /** * Returns the classNameTemplate. * @return String */ public String getClassNameTemplate() { return classNameTemplate; } /** * Returns the javaSourceFolder. * @return String */ public String getJavaSourceFolder() { return javaSourceFolder; } /** * Returns the packagePrefix. * @return String */ public String getPackagePrefix() { return packagePrefix; } /** * Sets the classNameTemplate. * @param classNameTemplate The classNameTemplate to set */ public void setClassNameTemplate(String classNameTemplate) { this.classNameTemplate = classNameTemplate; } /** * Sets the javaSourceFolder. * @param javaSourceFolder The javaSourceFolder to set */ public void setJavaSourceFolder(String javaSourceFolder) { this.javaSourceFolder = javaSourceFolder; } /** * Sets the packagePrefix. * @param packagePrefix The packagePrefix to set */ public void setPackagePrefix(String packagePrefix) { this.packagePrefix = packagePrefix; } /** * Returns the markupLanguageParser. * @return String */ public String getMarkupLanguageParser() { return markupLanguageParser; } /** * Sets the markupLanguageParser. * @param markupLanguageParser The markupLanguageParser to set */ public void setMarkupLanguageParser(String markupLanguageParser) { this.markupLanguageParser = markupLanguageParser; } /** * Returns the domFactory. * @return String */ public String getDomFactory() { return domFactory; } /** * Sets the domFactory. * @param domFactory The domFactory to set */ public void setDomFactory(String domFactory) { this.domFactory = domFactory; } } --- NEW FILE: XmlceclipsePlugin.java --- /* * Copyright (c) 2002 David Corbin and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU General Public License v2 * which accompanies this distribution, and is available at * http://www.gnu.org/copyleft/gpl.html * * Contributors: * @author David Corbin - Initial implementation. * @author Bill Barr - Documonkey * @version %I%, %G% */ package net.sourceforge.xmlceclipse.core; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.MissingResourceException; import java.util.ResourceBundle; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPluginDescriptor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.ui.plugin.AbstractUIPlugin; /** * The main plugin class to be used in the desktop. */ public class XmlceclipsePlugin extends AbstractUIPlugin { public static String PLUGIN_ID = "net.sourceforge.xmlceclipse"; //The shared instance. private static XmlceclipsePlugin plugin; //Resource bundle. private ResourceBundle resourceBundle; /** * The constructor. * * @param descriptor the named instance of the plugin * @throws MissingResourceException Signals that a resource is missing */ public XmlceclipsePlugin(IPluginDescriptor descriptor) { super(descriptor); plugin = this; try { resourceBundle= ResourceBundle.getBundle("net.sourceforge.xmlceclipse.xmlceclipsePluginResources"); } catch (MissingResourceException x) { resourceBundle = null; } } /** * Returns the shared instance. * * @returns plugin the shared instance */ public static XmlceclipsePlugin getDefault() { return plugin; } /** * Returns the workspace instance. * * @returns ResourcesPlugin the workspace instance */ public static IWorkspace getWorkspace() { return ResourcesPlugin.getWorkspace(); } /** * Returns the string from the plugin's resource bundle, * or 'key' if not found. * * @param key the key from the plugin's resource bundle * @return bundle the value of the key * @return key an empty key * @throws MissingResourceException Signals that a resource is missing */ public static String getResourceString(String key) { ResourceBundle bundle= XmlceclipsePlugin.getDefault().getResourceBundle(); try { return bundle.getString(key); } catch (MissingResourceException e) { return key; } } /** * Returns the plugin's resource bundle * * @return resourceBundle the instance of the resource bundle */ public ResourceBundle getResourceBundle() { return resourceBundle; } Map resourceProperties = new HashMap(); public XmlcProperties getProperties(IResource resource) { ProjectPropertyGroup propertyGroup = getPropertyGroup(resource); return propertyGroup.getProperty(resource); } private ProjectPropertyGroup getPropertyGroup(IResource resource) { String key = resource.getProject().getFullPath().toString(); ProjectPropertyGroup propertyGroup = (ProjectPropertyGroup)resourceProperties.get(key); if (propertyGroup == null) { propertyGroup = new ProjectPropertyGroup(resource.getProject()); resourceProperties.put(key,propertyGroup); } return propertyGroup; } public void storeProperties(IResource resource,XmlcProperties properties) { try { ProjectPropertyGroup group = getPropertyGroup(resource); group.setProperties(resource,properties); } catch(IOException e) { IStatus status = new Status(IStatus.ERROR,PLUGIN_ID,-1, "Unable to save XMLC properties",e); } } } --- NEW FILE: XmlcBuilder.java --- /* * Copyright (c) 2002 David Corbin and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU General Public License v2 * which accompanies this distribution, and is available at * http://www.gnu.org/copyleft/gpl.html * * Contributors: * David Corbin - Initial implementation. */ package net.sourceforge.xmlceclipse.core; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; import net.sourceforge.xmlceclipse.core.util.CoreUtil; import org.eclipse.core.resources.ICommand; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceDelta; import org.eclipse.core.resources.IResourceDeltaVisitor; import org.eclipse.core.resources.IResourceVisitor; import org.eclipse.core.resources.IncrementalProjectBuilder; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Path; import org.eclipse.jdt.core.JavaModelException; import org.enhydra.xml.xmlc.commands.xmlc.XMLC; /** * @author dcorbin * * To change this generated comment edit the template variable "typecomment": * Window>Preferences>Java>Templates. * To enable and disable the creation of type comments go to * Window>Preferences>Java>Code Generation. */ public class XmlcBuilder extends IncrementalProjectBuilder { public static String BUILDER_ID="net.sourceforge.xmlceclipse.xmlcBuilder"; public static class XmlcSource { IResource resource; XmlcProperties properties; public XmlcSource(IResource resource) { this.resource = resource; properties = XmlceclipsePlugin.getDefault().getProperties(resource); } public String sourceFile() { return resource.getLocation().toOSString(); } public String className() { String resourceName = resource.getName(); int dotPosition = resourceName.indexOf('.'); String baseClassName = resourceName.substring(0,dotPosition); String className = properties.getClassNameTemplate(); className = className.replaceAll("@",baseClassName); return packageName()+"."+className; } private String packageName() { IPath path = resource.getFullPath(); for (Iterator i=properties.getSourceFolders().iterator(); i.hasNext(); ) { IPath srcPath = new Path(i.next().toString()); if (srcPath.isPrefixOf(path)) { path = path.removeFirstSegments(srcPath.segmentCount()); path = path.removeLastSegments(1); if (path.segmentCount() == 0) return properties.getPackagePrefix(); return properties.getPackagePrefix() + "." +path.toString().replaceAll("/","."); } } return properties.getPackagePrefix() + "."; } public IFolder getBaseJavaSourceFolder() { IPath srcPath = new Path(properties.getJavaSourceFolder()); srcPath = srcPath.removeFirstSegments(1); IFolder folder = resource.getProject().getFolder(srcPath); return folder; } public IFolder getJavaSourceFolder() { IFolder folder = getBaseJavaSourceFolder(); String className = className(); String classAsPath = className.replace('.','/'); IPath path = new Path(classAsPath); path = path.removeLastSegments(1); return folder.getFolder(path); } public static boolean isXmlcSource(IResource resource) { String extension = resource.getFileExtension(); if (extension == null) return false; XmlcProperties properties = XmlceclipsePlugin.getDefault().getProperties(resource); List srcDirs = properties.getSourceFolders(); for (Iterator i=srcDirs.iterator(); i.hasNext(); ) { IPath srcPath = new Path((String)i.next()); if (!srcPath.isPrefixOf(resource.getFullPath())) return false; } return extension.equalsIgnoreCase("html"); } public String convertClassNameToJavaSourceFileName() { String className = className(); int i; while ((i=className.indexOf(".")) >= 0) { className = className.substring(0,i)+java.io.File.separator+ className.substring(i+1); } className = className+".java"; return className; } private void refreshResourceTree(IProgressMonitor monitor, IFile javaFile) throws CoreException { javaFile.refreshLocal(IResource.DEPTH_ZERO,monitor); javaFile.setDerived(true); javaFile.getParent().refreshLocal(IResource.DEPTH_ZERO,monitor); } public void refreshResult(IFolder outputSourceDir, IProgressMonitor monitor) throws CoreException { String className = convertClassNameToJavaSourceFileName(); IPath path = new Path(className); IFile javaFile = getBaseJavaSourceFolder().getFile(path); refreshResourceTree(monitor, javaFile); } } private void ensureFolderExists(IFolder folder,IProgressMonitor monitor) throws CoreException { IContainer parent = folder.getParent(); if (parent.exists()) { if (!folder.exists()) folder.create(true,true,monitor); return; } ensureFolderExists((IFolder)parent,monitor); } private boolean build(IResource resource,IProgressMonitor monitor) { try { if (!XmlcSource.isXmlcSource(resource)) return true; XmlcSource source = new XmlcSource(resource); IFolder outputSourceDir = source.getJavaSourceFolder(); ensureFolderExists(outputSourceDir,monitor); monitor.subTask("Compiling "+resource.getFullPath().toString()); ArrayList argList = buildArgList(source, outputSourceDir); XMLC xmlc = new XMLC(); String[] argArray = (String[])argList.toArray(new String[0]); xmlc.compile(argArray); source.refreshResult(outputSourceDir,monitor); if (monitor.isCanceled()) return false; return true; } catch (Exception e) { e.printStackTrace(); } return false; } private ArrayList buildArgList(XmlcSource source, IFolder outputSourceDir) { ArrayList argList = new ArrayList(); argList.add("-class"); argList.add(source.className()); argList.add("-keep"); argList.add("-nocompile"); argList.add("-sourceout"); argList.add(source.getBaseJavaSourceFolder().getLocation().toOSString()); argList.add("-parser"); argList.add(source.properties.getMarkupLanguageParser()); argList.add("-domfactory"); argList.add(source.properties.getDomFactory()); argList.add(source.sourceFile()); for (Iterator i=argList.iterator(); i.hasNext(); ) { System.out.print(i.next().toString()+" "); } System.out.println(); return argList; } private IPath sourceOutputDir(IResource resource) throws JavaModelException { return resource.getProject().getLocation().append("xmlc.src"); } class MyBuildVisitor implements IResourceVisitor, IResourceDeltaVisitor { IProgressMonitor monitor; public MyBuildVisitor(IProgressMonitor monitor) { this.monitor = monitor; } public boolean visit(IResource res) { return build(res,monitor); } public boolean visit(IResourceDelta res) { return build(res.getResource(),monitor); } } /** * @see org.eclipse.core.internal.events.InternalBuilder#build(int, Map, IProgressMonitor) */ protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException { if (kind == IncrementalProjectBuilder.FULL_BUILD) { fullBuild(monitor); } else { IResourceDelta delta = getDelta(getProject()); if (delta == null) { fullBuild(monitor); } else { incrementalBuild(delta, monitor); } } return null; } protected void fullBuild(final IProgressMonitor monitor) throws CoreException { try { getProject().accept(new MyBuildVisitor(monitor)); } catch (CoreException e) { } } protected void incrementalBuild(IResourceDelta delta, IProgressMonitor monitor) throws CoreException { // the visitor does the work. delta.accept(new MyBuildVisitor(monitor)); } public static void addBuilderToProject(IProject project) throws CoreException { IProjectDescription desc = project.getDescription(); ICommand[] commands = desc.getBuildSpec(); boolean found = false; for (int i = 0; i < commands.length; ++i) { if (commands[i].getBuilderName().equals(BUILDER_ID)) { found = true; break; } } if (!found) { CoreUtil.valdateEditProject(project); //add builder to project ICommand command = desc.newCommand(); command.setBuilderName(BUILDER_ID); ICommand[] newCommands = new ICommand[commands.length + 1]; // Add it before other builders. System.arraycopy(commands, 0, newCommands, 1, commands.length); newCommands[0] = command; desc.setBuildSpec(newCommands); project.setDescription(desc, null); } } } --- NEW FILE: XmlcCapabilityWizard.java --- /* * Copyright (c) 2002 David Corbin and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU General Public License v2 * which accompanies this distribution, and is available at * http://www.gnu.org/copyleft/gpl.html * * Contributors: * David Corbin - Initial implementation. */ package net.sourceforge.xmlceclipse.core; import org.eclipse.core.resources.IProject; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.Wizard; import org.eclipse.ui.ICapabilityWizard; import org.eclipse.ui.IWorkbench; /** * @author dcorbin * * To change this generated comment edit the template variable "typecomment": * Window>Preferences>Java>Templates. * To enable and disable the creation of type comments go to * Window>Preferences>Java>Code Generation. */ //public class XmlcCapabilityWizard extends Wizard implements ICapabilityWizard //{ // // /** // * @see org.eclipse.jface.wizard.IWizard#performFinish() // */ // public boolean performFinish() // { // return false; // } // // /** // * @see org.eclipse.ui.ICapabilityInstallWizard#init(IWorkbench, IStructuredSelection, IProject) // */ // public void init( // IWorkbench workbench, // IStructuredSelection selection, // IProject project) // { //// addPage(new XmlcOptionsPage("page name here")); // } // //} |
Update of /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core
In directory usw-pr-cvs1:/tmp/cvs-serv19441
Added Files:
.cvsignore plugin.xml build.properties .template .classpath
.project
Log Message:
Capabilities where deprecated, at least for a while
--- NEW FILE: .cvsignore ---
bin
xmlc-2.1
lib
build.xml
--- NEW FILE: plugin.xml ---
<?xml version="1.0" encoding="UTF-8"?>
<plugin
id="net.sourceforge.xmlceclipse"
name="XML Compiler"
version="0.0.1"
class="net.sourceforge.xmlceclipse.core.XmlceclipsePlugin">
<runtime>
<library name="xmlceclipse.jar"/>
<library name="xmlc-2.1/xmlc.jar"/>
<library name="xmlc-2.1/xhtml.jar"/>
<library name="xmlc-2.1/xerces-1.4.4-xmlc.jar"/>
<library name="xmlc-2.1/wireless.jar"/>
<library name="xmlc-2.1/jtidy-r7-xmlc.jar"/>
<library name="xmlc-2.1/gnu-regexp-1.1.4.jar"/>
</runtime>
<requires>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.jdt"/>
<import plugin="org.eclipse.jdt.core"/>
<import plugin="org.eclipse.swt"/>
<import plugin="org.eclipse.ui"/>
</requires>
<extension point="org.eclipse.ui.propertyPages">
<page objectClass="org.eclipse.jdt.core.IJavaProject"
name="XML Compiler properties"
class="net.sourceforge.xmlceclipse.ui.properties.ProjectPropertyPage"
id="net.sourceforge.xmlceclipse.ProjectProperty">
</page>
</extension>
<extension
id="xmlcNature"
name="XML Compiler"
point="org.eclipse.core.resources.natures">
<runtime>
<run
class="net.sourceforge.xmlceclipse.core.XmlcNature">
</run>
</runtime>
<requires-nature
id="org.eclipse.jdt.core.javanature">
</requires-nature>
<builder
id="net.sourceforge.xmlceclipse.xmlcBuilder">
</builder>
</extension>
<extension
id="xmlcBuilder"
name="XMLC Compiler"
point="org.eclipse.core.resources.builders">
<builder
hasNature="true">
<run
class="net.sourceforge.xmlceclipse.core.XmlcBuilder">
<parameter
name="optimize"
value="true">
</parameter>
<parameter
name="comment"
value="XML Compiler Builder">
</parameter>
</run>
</builder>
</extension>
<extension
point="org.eclipse.ui.capabilities">
<category
name="XMLC Category"
id="net.sourceforge.xmlceclipse.builder">
</category>
<capability
installWizard="net.sourceforge.xmlceclipse.XmlcCapabilityWizard"
icon="./icons/snowflake.gif"
description="Compile your HTML and XML files into Java classes"
category="net.sourceforge.xmlceclipse.builder"
natureId="net.sourceforge.xmlceclipse.xmlcNature"
installDetails="Set yoru XMLC Compiler Options"
id="net.sourceforge.xmlc.xmlcCapability">
<handleUI
id="net.sourceforge.xmlc.xmlcCapability">
</handleUI>
</capability>
</extension>
</plugin>
--- NEW FILE: build.properties ---
source.xmlceclipse.jar = src/
--- NEW FILE: .template ---
<?xml version="1.0" encoding="UTF-8"?>
<form>
<p/><p><b>Tips on working with this plug-in project</b></p><li>For the view of the new plug-in at a glance, go to the <img href="pageImage"/><a href="OverviewPage">Overview</a>.</li><li>You can test the contributions of this plug-in by launching another instance of the workbench. On the <b>Run</b> menu, click <b>Run As</b> and choose <img href="runTimeWorkbenchImage"/><a href="action.run">Run-time Workbench</a> from the available choices.</li><li>You can add more functionality to this plug-in by adding extensions using the <a href="action.newExtension">New Extension Wizard</a>.</li><li>The plug-in project contains Java code that you can debug. Place breakpoints in Java classes. On the <b>Run</b> menu, select <b>Debug As</b> and choose <img href="runTimeWorkbenchImage"/><a href="action.debug">Run-time Workbench</a> from the available choices.</li>
</form>
--- NEW FILE: .classpath ---
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="src" path="/org.eclipse.core.runtime"/>
<classpathentry kind="src" path="/org.eclipse.core.resources"/>
<classpathentry kind="src" path="/org.eclipse.jdt"/>
<classpathentry kind="src" path="/org.eclipse.jdt.core"/>
<classpathentry kind="src" path="/org.eclipse.swt"/>
<classpathentry kind="src" path="/org.eclipse.ui"/>
<classpathentry kind="src" path="/org.eclipse.core.boot"/>
<classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
<classpathentry kind="var" path="XMLC_HOME/gnu-regexp-1.1.4.jar"/>
<classpathentry kind="var" path="XMLC_HOME/jtidy-r7-xmlc.jar"/>
<classpathentry kind="var" path="XMLC_HOME/wireless.jar"/>
<classpathentry kind="var" path="XMLC_HOME/xerces-1.4.4-xmlc.jar"/>
<classpathentry kind="var" path="XMLC_HOME/xhtml.jar"/>
<classpathentry kind="var" path="XMLC_HOME/xmlc.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
--- NEW FILE: .project ---
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>net.sourceforge.xmlceclipse.core</name>
<comment></comment>
<projects>
<project>org.eclipse.core.boot</project>
<project>org.eclipse.core.resources</project>
<project>org.eclipse.core.runtime</project>
<project>org.eclipse.jdt</project>
<project>org.eclipse.jdt.core</project>
<project>org.eclipse.swt</project>
<project>org.eclipse.ui</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
|
|
From: <dc...@us...> - 2002-09-08 15:22:28
|
Update of /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net/sourceforge/xmlceclipse/core/util
In directory usw-pr-cvs1:/tmp/cvs-serv19441/src/net/sourceforge/xmlceclipse/core/util
Added Files:
CoreUtil.java
Log Message:
Capabilities where deprecated, at least for a while
--- NEW FILE: CoreUtil.java ---
package net.sourceforge.xmlceclipse.core.util;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
/**
* @author dcorbin
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
public class CoreUtil
{
private CoreUtil()
{
super();
}
public static void valdateEditProject(IProject project)
throws CoreException
{
IFile file = project.getFile(".project");
IStatus status = project.getWorkspace().validateEdit(new IFile[] {file},null);
if (!status.isOK())
throw new CoreException(status);
}
}
|
|
From: <dc...@us...> - 2002-09-08 15:21:06
|
Update of /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net/sourceforge/xmlceclipse/ui/properties In directory usw-pr-cvs1:/tmp/cvs-serv19088/src/net/sourceforge/xmlceclipse/ui/properties Log Message: Directory /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net/sourceforge/xmlceclipse/ui/properties added to the repository |
|
From: <dc...@us...> - 2002-09-08 15:21:06
|
Update of /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net/sourceforge/xmlceclipse/core/util In directory usw-pr-cvs1:/tmp/cvs-serv19088/src/net/sourceforge/xmlceclipse/core/util Log Message: Directory /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net/sourceforge/xmlceclipse/core/util added to the repository |
|
From: <dc...@us...> - 2002-09-08 15:21:06
|
Update of /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net/sourceforge/xmlceclipse/ui In directory usw-pr-cvs1:/tmp/cvs-serv19088/src/net/sourceforge/xmlceclipse/ui Log Message: Directory /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net/sourceforge/xmlceclipse/ui added to the repository |
|
From: <dc...@us...> - 2002-09-08 15:21:06
|
Update of /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net/sourceforge/xmlceclipse/core In directory usw-pr-cvs1:/tmp/cvs-serv19088/src/net/sourceforge/xmlceclipse/core Log Message: Directory /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net/sourceforge/xmlceclipse/core added to the repository |
|
From: <dc...@us...> - 2002-09-08 15:21:06
|
Update of /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net/sourceforge/xmlceclipse In directory usw-pr-cvs1:/tmp/cvs-serv19088/src/net/sourceforge/xmlceclipse Log Message: Directory /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net/sourceforge/xmlceclipse added to the repository |
|
From: <dc...@us...> - 2002-09-08 15:21:06
|
Update of /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net In directory usw-pr-cvs1:/tmp/cvs-serv19088/src/net Log Message: Directory /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net added to the repository |
|
From: <dc...@us...> - 2002-09-08 15:21:05
|
Update of /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net/sourceforge In directory usw-pr-cvs1:/tmp/cvs-serv19088/src/net/sourceforge Log Message: Directory /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src/net/sourceforge added to the repository |
|
From: <dc...@us...> - 2002-09-08 15:21:05
|
Update of /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src In directory usw-pr-cvs1:/tmp/cvs-serv19088/src Log Message: Directory /cvsroot/xmlceclipse/net.sourceforge.xmlceclipse.core/src added to the repository |
|
From: <dc...@us...> - 2002-09-08 15:02:57
|
Update of /cvsroot/xmlceclipse/xmlceclipse/src/net/sourceforge/xmlceclipse/core
In directory usw-pr-cvs1:/tmp/cvs-serv14523/src/net/sourceforge/xmlceclipse/core
Modified Files:
XmlcCapabilityWizard.java
Log Message:
Capabilities where deprecated, at least for a while
Index: XmlcCapabilityWizard.java
===================================================================
RCS file: /cvsroot/xmlceclipse/xmlceclipse/src/net/sourceforge/xmlceclipse/core/XmlcCapabilityWizard.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** XmlcCapabilityWizard.java 18 Aug 2002 02:16:30 -0000 1.2
--- XmlcCapabilityWizard.java 8 Sep 2002 15:02:54 -0000 1.3
***************
*** 26,50 ****
* Window>Preferences>Java>Code Generation.
*/
! public class XmlcCapabilityWizard extends Wizard implements ICapabilityWizard
! {
!
! /**
! * @see org.eclipse.jface.wizard.IWizard#performFinish()
! */
! public boolean performFinish()
! {
! return false;
! }
!
! /**
! * @see org.eclipse.ui.ICapabilityInstallWizard#init(IWorkbench, IStructuredSelection, IProject)
! */
! public void init(
! IWorkbench workbench,
! IStructuredSelection selection,
! IProject project)
! {
! // addPage(new XmlcOptionsPage("page name here"));
! }
!
! }
--- 26,50 ----
* Window>Preferences>Java>Code Generation.
*/
! //public class XmlcCapabilityWizard extends Wizard implements ICapabilityWizard
! //{
! //
! // /**
! // * @see org.eclipse.jface.wizard.IWizard#performFinish()
! // */
! // public boolean performFinish()
! // {
! // return false;
! // }
! //
! // /**
! // * @see org.eclipse.ui.ICapabilityInstallWizard#init(IWorkbench, IStructuredSelection, IProject)
! // */
! // public void init(
! // IWorkbench workbench,
! // IStructuredSelection selection,
! // IProject project)
! // {
! //// addPage(new XmlcOptionsPage("page name here"));
! // }
! //
! //}
|
|
From: <dc...@us...> - 2002-09-08 15:02:57
|
Update of /cvsroot/xmlceclipse/xmlceclipse In directory usw-pr-cvs1:/tmp/cvs-serv14523 Modified Files: .cvsignore Log Message: Capabilities where deprecated, at least for a while Index: .cvsignore =================================================================== RCS file: /cvsroot/xmlceclipse/xmlceclipse/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 29 Jul 2002 00:52:40 -0000 1.1 --- .cvsignore 8 Sep 2002 15:02:54 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- bin xmlc-2.1 + lib + build.xml |