The first version of StarTeam profile module. BLD200209180100
authormentlicher@netbeans.org
Tue, 17 Sep 2002 19:16:28 +0000
changeset 256272c23168b8c0
parent 2561 dae6956bf490
child 2563 d68607e24698
The first version of StarTeam profile module.
Basically copied and adapted from the StarTeam zip distribution.
vcs.profiles.starteam/build.xml
vcs.profiles.starteam/manifest.mf
vcs.profiles.starteam/src/org/netbeans/modules/vcs/profiles/starteam/Bundle.properties
vcs.profiles.starteam/src/org/netbeans/modules/vcs/profiles/starteam/list/Stcmd40ListCommand.java
vcs.profiles.starteam/src/org/netbeans/modules/vcs/profiles/starteam/mf-layer.xml
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/vcs.profiles.starteam/build.xml	Tue Sep 17 19:16:28 2002 +0000
     1.3 @@ -0,0 +1,128 @@
     1.4 +<?xml version='1.0' encoding='ISO-8859-1' ?>
     1.5 +<!--
     1.6 +                Sun Public License Notice
     1.7 +
     1.8 +The contents of this file are subject to the Sun Public License
     1.9 +Version 1.0 (the "License"). You may not use this file except in
    1.10 +compliance with the License. A copy of the License is available at
    1.11 +http://www.sun.com/
    1.12 +
    1.13 +The Original Code is NetBeans. The Initial Developer of the Original
    1.14 +Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun
    1.15 +Microsystems, Inc. All Rights Reserved.
    1.16 +-->
    1.17 +
    1.18 +
    1.19 +<project name="vcsgeneric/profiles/starteam" default="netbeans" basedir=".">
    1.20 +
    1.21 +  <property name="nbroot" value="../../.."/>
    1.22 +  <property name="nbext" value="${nbroot}/nbbuild"/>
    1.23 +  <property name="nbm_alias" value="nb_ide"/>
    1.24 +  <property name="homepage.base" value="netbeans.org"/>
    1.25 +  <property name="dist.base" value="www.netbeans.org/download/nbms/40"/>
    1.26 +  <property name="license.file" value="${nbroot}/nbbuild/standard-nbm-license.txt"/>
    1.27 +
    1.28 +  <taskdef name="makenbm" classname="org.netbeans.nbbuild.MakeNBM" classpath="${nbext}/nbantext.jar"/>
    1.29 +  <taskdef name="genlist" classname="org.netbeans.nbbuild.MakeListOfNBM" classpath="${nbext}/nbantext.jar"/>
    1.30 +  <taskdef name="locjar" classname="org.netbeans.nbbuild.LocalizedJar" classpath="${nbext}/nbantext.jar"/>
    1.31 +  <taskdef name="makelayer" classname="org.netbeans.nbbuild.MakeLayer" classpath="${nbext}/nbantext.jar"/>
    1.32 +
    1.33 +  <target name="compile">
    1.34 +    <!-- <echo message="basedir = ${basedir}, nbroot1 = ${nbroot1}"/> -->
    1.35 +    <javac srcdir="src" 
    1.36 +        deprecation="${build.compiler.deprecation}" 
    1.37 +        debug="${build.compiler.debug}"
    1.38 +        destdir="src">
    1.39 +      <classpath>        
    1.40 +	<pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
    1.41 +        <!--<pathelement location="${nbroot1}/openide/netbeans/lib/openide.jar"/>-->
    1.42 +        <fileset dir="${nbroot}/openide/netbeans/lib">
    1.43 +          <include name="openide*.jar" />
    1.44 +        </fileset>
    1.45 +	<pathelement location="${nbroot}/openidex/netbeans/modules/autoload/openidex.jar"/>
    1.46 +	<pathelement location="${nbroot}/vcscore/netbeans/modules/autoload/vcscore.jar"/>
    1.47 +	<pathelement location="${nbroot}/vcsgeneric/netbeans/modules/vcsgen.jar"/>
    1.48 +      </classpath>
    1.49 +    </javac>
    1.50 +  </target>
    1.51 +
    1.52 +  <target name="jars" depends="compile">
    1.53 +    <!--
    1.54 +    <makelayer topdir="src" destfile="src/org/netbeans/modules/vcs/profiles/starteam/layer-includes-commands.xml" absolutepath="true">
    1.55 +       <include name="org/netbeans/modules/vcs/profiles/starteam/commands/*.class"/>
    1.56 +       <include name="org/netbeans/modules/vcs/profiles/starteam/commands/*.java"/>
    1.57 +       <include name="org/netbeans/modules/vcs/profiles/starteam/commands/*.form"/>
    1.58 +       <include name="org/netbeans/modules/vcs/profiles/starteam/commands/*.properties"/>
    1.59 +    </makelayer>
    1.60 +    -->
    1.61 +    <makelayer topdir="src" destfile="src/org/netbeans/modules/vcs/profiles/starteam/layer-includes-config.xml" absolutepath="true">
    1.62 +       <include name="org/netbeans/modules/vcs/profiles/starteam/config/*.*"/>
    1.63 +       <exclude name="org/netbeans/modules/vcs/profiles/starteam/config/*_ja.*"/>
    1.64 +       <exclude name="org/netbeans/modules/vcs/profiles/starteam/config/*_XX.*"/>
    1.65 +       <exclude name="org/netbeans/modules/vcs/profiles/starteam/config/Bundle.properties"/>
    1.66 +       <exclude name="org/netbeans/modules/vcs/profiles/starteam/config/Bundle_*.properties"/>
    1.67 +    </makelayer>
    1.68 +    <makelayer topdir="src" destfile="src/org/netbeans/modules/vcs/profiles/starteam/layer-includes-configRB.xml" absolutepath="true">
    1.69 +       <include name="org/netbeans/modules/vcs/profiles/starteam/config/Bundle.properties"/>
    1.70 +       <include name="org/netbeans/modules/vcs/profiles/starteam/config/Bundle_*.properties"/>
    1.71 +    </makelayer>
    1.72 +    <makelayer topdir="src" destfile="src/org/netbeans/modules/vcs/profiles/starteam/layer-includes-config_ja.xml" absolutepath="true">
    1.73 +       <include name="org/netbeans/modules/vcs/profiles/starteam/config/*_ja.*"/>
    1.74 +       <exclude name="org/netbeans/modules/vcs/profiles/starteam/config/Bundle_ja.properties"/>
    1.75 +    </makelayer>  
    1.76 +    <makelayer topdir="src" destfile="src/org/netbeans/modules/vcs/profiles/starteam/layer-includes-list.xml" absolutepath="true">
    1.77 +       <include name="org/netbeans/modules/vcs/profiles/starteam/list/*.class"/>
    1.78 +       <include name="org/netbeans/modules/vcs/profiles/starteam/list/*.java"/>
    1.79 +       <include name="org/netbeans/modules/vcs/profiles/starteam/list/*.properties"/>
    1.80 +    </makelayer>
    1.81 +    <mkdir dir="netbeans/modules"/>
    1.82 +    <filter token="BUILD_NUMBER_SUBST" value="${buildnumber}"/>
    1.83 +    <copy file="manifest.mf" tofile="manifest-subst.mf" filtering="on"/>
    1.84 +    <locjar jarfile="netbeans/modules/starteam-profile.jar"
    1.85 +         manifest="manifest-subst.mf"
    1.86 +         basedir="src"
    1.87 +         excludesfile="${nbroot}/nbbuild/standard-jar-excludes.txt"
    1.88 +	 excludes="org/netbeans/modules/vcs/profiles/starteam/mf-layer_XX.xml"
    1.89 +         compress="false">
    1.90 +      <locale name="ja"/>
    1.91 +      <fileset dir="src/" excludesfile="${nbroot}/nbbuild/standard-jar-excludes.txt">
    1.92 +        <include name="**/*"/>
    1.93 +	<exclude name="org/netbeans/modules/vcs/profiles/starteam/config/*_XX.*"/>
    1.94 +      </fileset>
    1.95 +      <fileset dir="src/">
    1.96 +        <include name="**/*.java"/>
    1.97 +        <include name="**/*.form"/>
    1.98 +      </fileset>
    1.99 +    </locjar>
   1.100 +  </target>
   1.101 +
   1.102 +  <target name="netbeans" depends="jars">
   1.103 +    <genlist targetname="nbm" outputfiledir="${nbext}/netbeans"/>
   1.104 +  </target>
   1.105 +
   1.106 +  <target name="nbm" depends="netbeans">
   1.107 +    <makenbm file="starteam-profile.nbm"
   1.108 +             topdir="."
   1.109 +             module="netbeans/modules/starteam-profile.jar"
   1.110 +	     homepage="http://vcsgeneric.${homepage.base}/"
   1.111 +	     distribution="http://${dist.base}/starteam-profile.nbm">
   1.112 +      <license file="${license.file}"/>
   1.113 +      <signature keystore="${keystore}" storepass="${storepass}" alias="${nbm_alias}"/>
   1.114 +    </makenbm>
   1.115 +  </target>
   1.116 +
   1.117 +  <target name="clean">
   1.118 +    <delete>
   1.119 +      <fileset dir="src">
   1.120 +        <include name="**/*.class"/>
   1.121 +        <include name="**/*.jar"/>
   1.122 +        <include name="org/netbeans/modules/vcs/profiles/starteam/layer-include*.xml"/>
   1.123 +      </fileset>
   1.124 +    </delete>
   1.125 +    <delete file="manifest-subst.mf"/>
   1.126 +    <delete file="starteam-profile.nbm"/>
   1.127 +    <delete dir="netbeans"/>
   1.128 +    <delete dir="Info"/>
   1.129 +  </target>
   1.130 +
   1.131 +</project>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/vcs.profiles.starteam/manifest.mf	Tue Sep 17 19:16:28 2002 +0000
     2.3 @@ -0,0 +1,9 @@
     2.4 +OpenIDE-Module: org.netbeans.modules.vcs.profiles.starteam/1
     2.5 +OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/vcs/profiles/starteam/Bundle.properties
     2.6 +OpenIDE-Module-Specification-Version: 1.0
     2.7 +OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
     2.8 +OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
     2.9 +OpenIDE-Module-Module-Dependencies: org.netbeans.modules.vcscore/1,org.netbeans.modules.vcs.advanced/1
    2.10 +OpenIDE-Module-Layer: org/netbeans/modules/vcs/profiles/starteam/mf-layer.xml
    2.11 +OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
    2.12 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/vcs.profiles.starteam/src/org/netbeans/modules/vcs/profiles/starteam/Bundle.properties	Tue Sep 17 19:16:28 2002 +0000
     3.3 @@ -0,0 +1,16 @@
     3.4 +#                 Sun Public License Notice
     3.5 +# 
     3.6 +# The contents of this file are subject to the Sun Public License
     3.7 +# Version 1.0 (the "License"). You may not use this file except in
     3.8 +# compliance with the License. A copy of the License is available at
     3.9 +# http://www.sun.com/
    3.10 +# 
    3.11 +# The Original Code is NetBeans. The Initial Developer of the Original
    3.12 +# Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun
    3.13 +# Microsystems, Inc. All Rights Reserved.
    3.14 +
    3.15 +# Manifest
    3.16 +OpenIDE-Module-Name=StarTeam Command Line Support Profile
    3.17 +OpenIDE-Module-Display-Category=Version Control
    3.18 +OpenIDE-Module-Short-Description=Integration of StarTeam command-line interface into generic VCS support.
    3.19 +OpenIDE-Module-Long-Description=The StarTeam Command Line Support Profile module enables you to use StarTeam command-line interface as a version control system within the IDE through generic VCS support.
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/vcs.profiles.starteam/src/org/netbeans/modules/vcs/profiles/starteam/list/Stcmd40ListCommand.java	Tue Sep 17 19:16:28 2002 +0000
     4.3 @@ -0,0 +1,100 @@
     4.4 +/*
     4.5 + *                 Sun Public License Notice
     4.6 + * 
     4.7 + * The contents of this file are subject to the Sun Public License
     4.8 + * Version 1.0 (the "License"). You may not use this file except in
     4.9 + * compliance with the License. A copy of the License is available at
    4.10 + * http://www.sun.com/
    4.11 + * 
    4.12 + * The Original Code is Forte for Java, Community Edition. The Initial
    4.13 + * Developer of the Original Code is Sun Microsystems, Inc. Portions
    4.14 + * Copyright 1997-2000 Sun Microsystems, Inc. All Rights Reserved.
    4.15 + */
    4.16 +
    4.17 +package org.netbeans.modules.vcs.profiles.starteam.list;
    4.18 +
    4.19 +import org.netbeans.modules.vcscore.VcsFileSystem;
    4.20 +import org.netbeans.modules.vcscore.util.*;
    4.21 +import org.netbeans.modules.vcscore.commands.CommandOutputListener;
    4.22 +import org.netbeans.modules.vcscore.commands.CommandDataOutputListener;
    4.23 +
    4.24 +import org.netbeans.modules.vcs.profiles.list.AbstractListCommand;
    4.25 +
    4.26 +import java.util.Hashtable;
    4.27 +import java.io.*;
    4.28 +
    4.29 +/**
    4.30 + *
    4.31 + * @author  Martin Entlicher
    4.32 + */
    4.33 +public class Stcmd40ListCommand extends AbstractListCommand {
    4.34 +
    4.35 +    private Debug E=new Debug("Stcmd40List",true);
    4.36 +    private Debug D=E;
    4.37 +
    4.38 +    /** Creates new Stcmd40ListCommand */
    4.39 +    public Stcmd40ListCommand() {
    4.40 +    }
    4.41 +
    4.42 +    public void setFileSystem(VcsFileSystem fileSystem) {
    4.43 +        super.setFileSystem(fileSystem);
    4.44 +    }
    4.45 +
    4.46 +    /**
    4.47 +     * List files of CVS Repository.
    4.48 +     * @param vars Variables used by the command
    4.49 +     * @param args Command-line arguments
    4.50 +     * filesByName listing of files with statuses
    4.51 +     * @param stdoutNRListener listener of the standard output of the command
    4.52 +     * @param stderrNRListener listener of the error output of the command
    4.53 +     * @param stdoutListener listener of the standard output of the command which
    4.54 +     *                       satisfies regex <CODE>dataRegex</CODE>
    4.55 +     * @param dataRegex the regular expression for parsing the standard output
    4.56 +     * @param stderrListener listener of the error output of the command which
    4.57 +     *                       satisfies regex <CODE>errorRegex</CODE>
    4.58 +     * @param errorRegex the regular expression for parsing the error output
    4.59 +     */
    4.60 +    public boolean list(Hashtable vars, String[] args, Hashtable filesByName,
    4.61 +                        CommandOutputListener stdoutNRListener, CommandOutputListener stderrNRListener,
    4.62 +                        CommandDataOutputListener stdoutListener, String dataRegex,
    4.63 +                        CommandDataOutputListener stderrListener, String errorRegex) {
    4.64 +        this.stdoutNRListener = stdoutNRListener;
    4.65 +        this.stderrNRListener = stderrNRListener;
    4.66 +        this.stderrListener = stderrListener;
    4.67 +        this.dataRegex = dataRegex;
    4.68 +        this.errorRegex = errorRegex;
    4.69 +        this.filesByName = filesByName;
    4.70 +        initVars(vars);
    4.71 +        try {
    4.72 +            runCommand(vars, args, false);
    4.73 +        } catch (InterruptedException iexc) {
    4.74 +            return false;
    4.75 +        }
    4.76 +
    4.77 +        return !shouldFail;
    4.78 +    }
    4.79 +
    4.80 +    public void outputData(String[] elements) {
    4.81 +        String line=elements[0];
    4.82 +        D.deb("match: line = "+line);
    4.83 +        String subdir=line.trim();
    4.84 +        if( subdir.endsWith("/") ){
    4.85 +            String[] statuses = {"", "", "", "", "", "", "", subdir};
    4.86 +            filesByName.put(subdir, statuses);
    4.87 +        }
    4.88 +        else if ( subdir.endsWith("\\") ){
    4.89 +            subdir=subdir.substring(0, subdir.lastIndexOf("\\"))+"/";
    4.90 +            String[] statuses = {"", "", "", "", "", "", "", subdir};
    4.91 +            filesByName.put(subdir, statuses);
    4.92 +        }
    4.93 +        else{
    4.94 +            if( line.indexOf("Folder:") < 0 ){
    4.95 +                //D.deb("I have elements = "+VcsUtilities.arrayToString(elements));
    4.96 +                if (elements.length > 7)
    4.97 +                    filesByName.put(elements[7], elements);
    4.98 +                else
    4.99 +                    filesByName.put(elements[0], elements);
   4.100 +            }
   4.101 +        }
   4.102 +    }
   4.103 +}
   4.104 \ No newline at end of file
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/vcs.profiles.starteam/src/org/netbeans/modules/vcs/profiles/starteam/mf-layer.xml	Tue Sep 17 19:16:28 2002 +0000
     5.3 @@ -0,0 +1,44 @@
     5.4 +<?xml version='1.0'?>
     5.5 +<!--
     5.6 +                Sun Public License Notice
     5.7 +
     5.8 +The contents of this file are subject to the Sun Public License
     5.9 +Version 1.0 (the "License"). You may not use this file except in
    5.10 +compliance with the License. A copy of the License is available at
    5.11 +http://www.sun.com/
    5.12 +
    5.13 +The Original Code is NetBeans. The Initial Developer of the Original
    5.14 +Code is Sun Microsystems, Inc. Portions Copyright 1997-2001 Sun
    5.15 +Microsystems, Inc. All Rights Reserved.
    5.16 +-->
    5.17 +
    5.18 +<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.0//EN" "http://www.netbeans.org/dtds/filesystem-1_0.dtd" [
    5.19 +  <!ENTITY includefiles_config SYSTEM "layer-includes-config.xml">
    5.20 +  <!ENTITY includefiles_configRB SYSTEM "layer-includes-configRB.xml">
    5.21 +  <!ENTITY includefiles_list SYSTEM "layer-includes-list.xml">
    5.22 +]>
    5.23 +<filesystem>
    5.24 +  <folder name="org">
    5.25 +    <folder name="netbeans">
    5.26 +      <folder name="modules">
    5.27 +        <folder name="vcs">
    5.28 +          <folder name="profiles">
    5.29 +            <folder name="starteam">
    5.30 +              <folder name="config">
    5.31 +                &includefiles_configRB;
    5.32 +              </folder>
    5.33 +              <folder name="list">
    5.34 +                &includefiles_list;
    5.35 +              </folder>
    5.36 +            </folder>
    5.37 +          </folder>
    5.38 +        </folder>
    5.39 +      </folder>
    5.40 +    </folder>
    5.41 +  </folder>
    5.42 +  <folder name="vcs">
    5.43 +    <folder name="config">
    5.44 +      &includefiles_config;
    5.45 +    </folder>
    5.46 +  </folder>
    5.47 +</filesystem>