facebook

ContentAssist-CodeAssist /Java Build Path Options

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #261712 Reply

    SwingCarlos
    Participant

    So my ContentAssist-CodeAssist is not turned on. I can’t
    Use Ctrl-Click, F3, Ctrl-space, Ctrl-Shift-G, the whole shebang.
    It seems to me that I have to add the src folders to the
    Java Build Path. Unfortunately, the Properties->JavaBuildPath
    option is not available for the project!

    I have several projects in my workspace. All but one has these set of
    options on the left hand side:

    Info
    Builders
    CVS
    FreeMarker Content
    Hibernate Settings
    Java Build Path
    Java Code Style
    <snip>
    XDoclet Configurations

    The project that i’m trying to configure properly has
    the following Properties options on the left panel:
    Info
    Builders
    CVS
    FreeMarker Content
    +MyEclipse
    Packaging Configurations
    <snip>
    XDoclet Configurations

    Someone please tell me how to add my src folder to
    the build path so I can get ContentAssist-CodeAssist back.

    MyEclipse 5.0 GA
    jdk 1.4
    And these are regular Java projects not WeProjects.
    And just for kicks, i’ve included my build.xml below.

    Thanks,
    Carlos

    <?xml version=”1.0″ encoding=”UTF-8″?>

    <project default=”default” basedir=”.” name=”HIG-Web”>

    <property file=”build.properties” />
    <property file=”../HIG-Master/build.properties” />

    <!– Ideally, you shouldn’t have to ever change anything below this line to
    configure this build script for a new machine. All configuration
    should be done in the build.properties files mentioned above. –>
    <property name=”dir.lib” value=”../HIG-Third-Party” />
    <property name=”dir.ilog” value=”${dir.lib}/ilog” />
    <property name=”dir.src” value=”src” />
    <property name=”dir.conf.env” value=”${master.dir.conf}/${master.default.environment}” />
    <property name=”dir.jsp” value=”pages” />
    <property name=”dir.docs” value=”docs” />
    <property name=”dir.classes” value=”${dir.build}/classes” />
    <property name=”dir.web-inf” value=”${dir.build}/WEB-INF” />
    <property name=”dir.build.jsp” value=”${dir.build}/jsp” />
    <property name=”dir.jboss.deploy” value=”${master.dir.jboss.base}/server/${master.jboss.server.name}/deploy” />
    <property name=”dir.tomcat.deploy” value=”${master.dir.tomcat.base}/webapps” />
    <property name=”dir.test.home” value=”${dir.classes}”/>
    <property name=”dir.test.conf” value=”${master.dir.conf}/test” />

    <!– ===== Set the default target ===== –>
    <target name=”default”
    description=”This target is used to change the default target called dynamically through the properties file.”>
    <antcall target=”${defaultTarget}”/>
    </target>

    <!– ===== Clean up old directories ===== –>
    <target name=”clean” description=”Removes the old build directory.”>
    <!– Delete the normal build directory. –>
    <delete dir=”${dir.build}” />

    <!– Delete directories used for Tomcat deployments. –>
    <delete dir=”${dir.deploy.local}/classes” />
    <delete dir=”${dir.deploy.local}/lib” />
    </target>

    <!– ===== Create directories for a new build ===== –>
    <target name=”configure” depends=”clean” description=”Creates new build tree”>
    <mkdir dir=”${dir.build}” />
    <mkdir dir=”${dir.classes}” />
    </target>

    <!– ===== Initialize things for a new build ===== –>
    <target name=”init” depends=”configure” description=”Sets the timestamp.”>
    <tstamp />
    <echo> Running ${project.name} Build. </echo>
    </target>

    <!– ===== CVS targets ===== –>
    <target name=”cvs-up” description=”Update all files from CVS to the latest revision on the current branch.”>
    <echo> Running ${project.name} Build. </echo>
    <cvs cvsRoot=”${master.cvs.root}” dest=”${master.dir.cvs.checkout}/${project.name}” command=”update ${master.cvs.update.options}” quiet=”true”/>
    </target>

    <target name=”cvs-tag-up” description=”Updates all files recursively to a given tag from CVS.”>
    <echo> Running ${project.name} Build. </echo>
    <cvs cvsRoot=”${master.cvs.root}” dest=”${master.dir.cvs.checkout}/${project.name}” command=”update ${master.cvs.update.options} -r ${master.cvs.tagname}” quiet=”true” />
    </target>

    <target name=”cvs-head-up” description=”Updates all files recursively to the head revision”>
    <echo> Running ${project.name} Build. </echo>
    <cvs cvsRoot=”${master.cvs.root}” dest=”${master.dir.cvs.checkout}/${project.name}” command=”update ${master.cvs.update.options} -A” quiet=”true” />
    </target>

    <target name=”cvs-tag” description=”Tags all files recursively in the project with the tag entered.”>
    <tstamp />

    <echo> Tagging ${project.name} Build. </echo>
    <echo> Tag is: ${master.cvs.tagname} </echo>

    <cvs cvsRoot=”${master.cvs.root}” command=”tag ${master.cvs.tagname}” />
    </target>

    <!– ===== Compile source code and do all preparations for creating a warfile for local deployment ===== –>
    <target name=”compile” depends=”init”
    description=”Copies the JSP pages over to the deploy dir and compiles Java source code.”>
    <echo> #1. Copying JSP/HTML/CSS/image files. </echo>

    <copy todir=”${dir.build}”>
    <fileset dir=”${dir.jsp}” />
    </copy>

    <echo />
    <echo> #1b. Temporary copying of properties files from _en_US to _en. </echo>

    <!– This section is temporary until the NWL AccessController gets fixed RE: “en” Locale –>
    <copy todir=”${dir.classes}”>
    <fileset dir=”${master.dir.conf}/en_US” />
    </copy>
    <copy file=”${dir.classes}/ApplicationResources_en_US.properties” tofile=”${dir.classes}/ApplicationResources_en.properties” />
    <copy file=”${dir.classes}/CalendarDates_en_US.xml” tofile=”${dir.classes}/CalendarDates_en.xml” />
    <copy file=”${dir.classes}/WebContent_en_US.xml” tofile=”${dir.classes}/WebContent_en.xml” />
    <copy file=”${dir.classes}/tag-page-default_en_US.properties” tofile=”${dir.classes}/tag-page-default_en.properties” />
    <copy file=”${dir.classes}/tags_en_US.properties” tofile=”${dir.classes}/tags_en.properties” />
    <copy file=”${dir.classes}/validation_msgs_en_US.properties” tofile=”${dir.classes}/validation_msgs_en.properties” />
    <!– This section is temporary until the NWL AccessController gets fixed RE: “en” Locale –>

    <echo />
    <echo> #1c. Temporary copying of all image files from en_US dir to en_CA dir. </echo>

    <!– This section is temporary until we automate QA deployment from the app server to the web server. –>
    <copy todir=”${dir.build}/images/en_CA”>
    <fileset dir=”${dir.build}/images/en_US” />
    </copy>
    <!– This section is temporary until we automate QA deployment from the app server to the web server. –>

    <echo />
    <echo> #2. Compiling Java Source Code. </echo>

    <javac srcdir=”${dir.src}” destdir=”${dir.classes}” source=”1.4″ deprecation=”${master.compile.option.deprecation}” debug=”${master.compile.option.debug}” debuglevel=”lines,vars,source”>
    <classpath>
    <fileset dir=”${dir.lib}”>
    <include name=”**/*.jar”/>
    </fileset>
    </classpath>
    </javac>
    </target>

    <!– ===== Create a warfile that will be used for a local deployment ===== –>
    <target name=”dist” depends=”compile” description=”Creates the .WAR file for the project.”>
    <war destfile=”${dir.build}/${project.name}.war” webxml=”${dir.build}/WEB-INF/web.xml”>
    <fileset dir=”${dir.build}”
    excludes=”**/classes/**,**/WEB-INF/**,${project.name}.war” />

    <webinf dir=”${dir.build}/WEB-INF”>
    <exclude name=”**/web.xml” />
    </webinf>

    <classes dir=”${dir.conf.env}” includes=”**/*.xml,**/*.properties”/>
    <classes dir=”${master.dir.conf}/en_CA” includes=”**/*.xml,**/*.properties” />
    <classes dir=”${master.dir.conf}/es_US” includes=”**/*.xml,**/*.properties” />
    <!– Temporarily commented out. See temporary section above in “compile” task.
    <classes dir=”${master.dir.conf}/en_US” includes=”**/*.xml,**/*.properties” />
    –>
    <classes dir=”${master.dir.conf}” includes=”ApplicationResources.properties,build.xml,webpages.properties” />
    <classes dir=”${dir.classes}” />

    <lib dir=”${dir.lib}”>
    <exclude name=”**/*.txt” />
    <exclude name=”build.xml” />
    <exclude name=”build.properties” />
    <exclude name=”.project” />
    <exclude name=”ilog/*” />
    <exclude name=”EJB/*” />
    <exclude name=”command-line/*” />
    <exclude name=”log4j-1.2.8.jar” />
    </lib>

    <lib dir=”${dir.ilog}” />
    </war>
    </target>

    <!– ===== Deploy the warfile to a local JBoss instance ===== –>
    <target name=”deploy-jboss” depends=”dist” description=”Deploys the .WAR file to JBoss.”>
    <delete dir=”${dir.jboss.deploy}/${project.name}.war” />
    <copy file=”${dir.build}/${project.name}.war” todir=”${dir.jboss.deploy}” />
    </target>

    <!– ===== Compile source code and do all preparations for creating a warfile for production deployment ===== –>
    <target name=”create-dirs-for-prod” depends=”init” description=”Create necessary directories for production deploy”>
    <mkdir dir=”${dir.build.jsp}” />
    <mkdir dir=”${dir.build}/WEB-INF” />
    </target>

    <target name=”compile-for-prod” depends=”create-dirs-for-prod”
    description=”Copies the JSP pages over to the deploy dir and compiles Java source code.”>
    <echo> #1. Copying JSP/HTML files. </echo>

    <copy todir=”${dir.build.jsp}”>
    <fileset dir=”${dir.jsp}/jsp” />
    </copy>

    <copy todir=”${dir.build}/WEB-INF”>
    <fileset dir=”${dir.jsp}/WEB-INF” />
    </copy>

    <echo />
    <echo> #1b. Temporary copying of properties files from _en_US to _en. </echo>

    <!– This section is temporary until the NWL AccessController gets fixed RE: “en” Locale –>
    <copy todir=”${dir.classes}”>
    <fileset dir=”${master.dir.conf}/en_US” />
    </copy>
    <copy file=”${dir.classes}/ApplicationResources_en_US.properties” tofile=”${dir.classes}/ApplicationResources_en.properties” />
    <copy file=”${dir.classes}/CalendarDates_en_US.xml” tofile=”${dir.classes}/CalendarDates_en.xml” />
    <copy file=”${dir.classes}/WebContent_en_US.xml” tofile=”${dir.classes}/WebContent_en.xml” />
    <copy file=”${dir.classes}/tag-page-default_en_US.properties” tofile=”${dir.classes}/tag-page-default_en.properties” />
    <copy file=”${dir.classes}/tags_en_US.properties” tofile=”${dir.classes}/tags_en.properties” />
    <copy file=”${dir.classes}/validation_msgs_en_US.properties” tofile=”${dir.classes}/validation_msgs_en.properties” />
    <!– This section is temporary until the NWL AccessController gets fixed RE: “en” Locale –>

    <!– This section is temporary until we automate QA deployment from the app server to the web server.
    <echo />
    <echo> #1c. Temporary copying of all image files from en_US dir to en_CA dir. </echo>
    <copy todir=”${dir.build}/images/en_CA”>
    <fileset dir=”${dir.build}/images/en_US” />
    </copy>
    This section is temporary until we automate QA deployment from the app server to the web server. –>

    <echo />
    <echo> #2. Compiling Java Source Code. </echo>

    <javac srcdir=”${dir.src}” destdir=”${dir.classes}” source=”1.4″ deprecation=”${master.compile.option.deprecation}” debug=”${master.compile.option.debug}” debuglevel=”lines,vars,source”>
    <classpath>
    <fileset dir=”${dir.lib}”>
    <include name=”**/*.jar”/>
    </fileset>
    </classpath>
    </javac>
    </target>

    <!– ===== Create a warfile that will be used for production deployment ===== –>
    <target name=”dist-for-prod” depends=”compile-for-prod” description=”Creates the .WAR file for a production deploy.”>
    <war destfile=”${dir.build}/${project.name}.war” webxml=”${dir.build}/WEB-INF/web.xml”>
    <fileset dir=”${dir.build}”
    excludes=”**/classes/**,**/WEB-INF/**,${project.name}.war” />

    <webinf dir=”${dir.build}/WEB-INF”>
    <exclude name=”**/web.xml” />
    </webinf>

    <classes dir=”${master.dir.conf}/${master.prod.server}” includes=”**/*.xml,**/*.properties”/>
    <classes dir=”${master.dir.conf}/en_CA” includes=”**/*.xml,**/*.properties” />
    <!– Temporarily commented out. See temporary section above in “compile” task.
    <classes dir=”${master.dir.conf}/en_US” includes=”**/*.xml,**/*.properties” />
    –>
    <classes dir=”${master.dir.conf}” includes=”ApplicationResources.properties,build.xml,webpages.properties” />
    <classes dir=”${dir.classes}” />

    <lib dir=”${dir.lib}”>
    <exclude name=”**/*.txt” />
    <exclude name=”build.xml” />
    <exclude name=”build.properties” />
    <exclude name=”.project” />
    <exclude name=”ilog/*” />
    <exclude name=”EJB/*” />
    <exclude name=”log4j-1.2.8.jar” />
    </lib>

    <lib dir=”${dir.ilog}” />
    </war>
    </target>

    <!– ===== Deploy the warfile to the app server specified in ${master.prod.server} ===== –>
    <target name=”deploy-prod-app” description=”Deploys the WAR file to the specified Production App Server.”>
    <ftp server=”${master.prod.server}” userid=”${master.ftp.userid}” password=”${master.ftp.password}”
    remotedir=”${dir.jboss.deploy}”>
    <fileset file=”${dir.build}/${project.name}.war” />
    </ftp>
    </target>

    <!– ===== Deploy static content to the web server specified in ${master.prod.server} ===== –>
    <target name=”deploy-static-content” description=”Deploys static content to the specified Production Web Server.”>
    <property name=”prod.web.dir” value=”/opt/hpws/apache/htdocs” />

    <ftp server=”${master.prod.server}” userid=”${master.ftp.userid}” password=”${master.ftp.password}”
    remotedir=”${prod.web.dir}/images” chmod=”755″>
    <fileset dir=”${dir.jsp}/images” />
    </ftp>

    <ftp server=”${master.prod.server}” userid=”${master.ftp.userid}” password=”${master.ftp.password}”
    remotedir=”${prod.web.dir}/images/en_CA” chmod=”755″>
    <fileset dir=”${dir.jsp}/images/en_US” />
    </ftp>

    <ftp server=”${master.prod.server}” userid=”${master.ftp.userid}” password=”${master.ftp.password}”
    remotedir=”${prod.web.dir}/css” chmod=”755″>
    <fileset dir=”${dir.jsp}/css” />
    </ftp>

    <ftp server=”${master.prod.server}” userid=”${master.ftp.userid}” password=”${master.ftp.password}”
    remotedir=”${prod.web.dir}/includes” chmod=”755″>
    <fileset dir=”${dir.jsp}/includes” />
    </ftp>

    <ftp server=”${master.prod.server}” userid=”${master.ftp.userid}” password=”${master.ftp.password}”
    remotedir=”${prod.web.dir}/includes” chmod=”755″>
    <fileset dir=”${dir.jsp}/pdf” />
    </ftp>
    </target>

    <!– ===== Compiles and deploys the source into the HIG-Web package for ease of local developent ===== –>
    <target name=”deploy-local” depends=”init”
    description=”Compiles and deploys the source code and the property files into the WEB-INF dir”>

    <echo> #0. Creating directories. </echo>
    <mkdir dir=”${dir.build}” />
    <mkdir dir=”${dir.deploy.local}/classes”/>

    <echo> #1. Compiling Java Source Code. </echo>

    <javac srcdir=”${dir.src}” destdir=”${dir.deploy.local}/classes” source=”1.4″ deprecation=”${master.compile.option.deprecation}” debug=”${master.compile.option.debug}” debuglevel=”lines,vars,source”>
    <classpath>
    <fileset dir=”${dir.lib}”>
    <include name=”**/*.jar”/>
    </fileset>
    </classpath>
    </javac>

    <echo> #2. Copy the configuration files</echo>
    <copy overwrite=”true” todir=”${dir.deploy.local}/classes”>
    <fileset dir=”${dir.conf.env}” includes=”**/*.xml,**/*.properties” />
    <fileset dir=”${master.dir.conf}/en_CA” includes=”**/*.xml,**/*.properties” />
    <fileset dir=”${master.dir.conf}/en_US” includes=”**/*.xml,**/*.properties” />
    <fileset dir=”${master.dir.conf}” includes=”ApplicationResources.properties,build.xml,webpages.properties” />
    </copy>

    <echo> #2b. Temporary copying of properties files from _en_US to _en. </echo>

    <!– This section is temporary until the NWL AccessController gets fixed RE: “en” Locale –>
    <copy overwrite=”true” file=”${dir.deploy.local}/classes/ApplicationResources.properties” tofile=”${dir.deploy.local}/classes/ApplicationResources_en.properties” />
    <copy overwrite=”true” file=”${dir.deploy.local}/classes/ApplicationResources.properties” tofile=”${dir.deploy.local}/classes/ApplicationResources_en_US.properties” />
    <copy overwrite=”true” file=”${dir.deploy.local}/classes/CalendarDates_en_US.xml” tofile=”${dir.deploy.local}/classes/CalendarDates_en.xml” />
    <copy overwrite=”true” file=”${dir.deploy.local}/classes/WebContent_en_US.xml” tofile=”${dir.deploy.local}/classes/WebContent_en.xml” />
    <copy overwrite=”true” file=”${dir.deploy.local}/classes/tag-page-default_en_US.properties” tofile=”${dir.deploy.local}/classes/tag-page-default_en.properties” />
    <copy overwrite=”true” file=”${dir.deploy.local}/classes/tags_en_US.properties” tofile=”${dir.deploy.local}/classes/tags_en.properties” />
    <copy overwrite=”true” file=”${dir.deploy.local}/classes/validation_msgs_en_US.properties” tofile=”${dir.deploy.local}/classes/validation_msgs_en.properties” />
    <!– This section is temporary until the NWL AccessController gets fixed RE: “en” Locale –>

    <echo> #3. Copy libraries. </echo>
    <copy todir=”${dir.deploy.local}/lib”>
    <fileset dir=”${dir.lib}” includes=”**/*.jar” />
    <fileset dir=”${dir.ilog}” includes=”**/*.jar” />
    <fileset dir=”${dir.lib}” includes=”ojdbc14.zip” />
    </copy>
    </target>

    <target name=”deploy-local-as-dir” depends=”deploy-local”
    description=”Deploys the .WAR file as a directory.”>

    <delete file=”${dir.jboss.deploy}/${project.name}.war” />
    <mkdir dir=”${dir.jboss.deploy}/${project.name}.war” />
    <copy todir=”${dir.jboss.deploy}/${project.name}.war”>
    <fileset dir=”${dir.deploy.local}/..”/>
    </copy>
    </target>

    <target name=”deploy-local-as-dir-jsps”
    description=”Deploys css/images/includes/jsps to the .WAR directory.”>
    <copy todir=”${dir.jboss.deploy}/${project.name}.war/css”>
    <fileset dir=”${dir.deploy.local}/../css”/>
    </copy>
    <copy todir=”${dir.jboss.deploy}/${project.name}.war/images”>
    <fileset dir=”${dir.deploy.local}/../images”/>
    </copy>
    <copy todir=”${dir.jboss.deploy}/${project.name}.war/includes”>
    <fileset dir=”${dir.deploy.local}/../includes”/>
    </copy>
    <copy todir=”${dir.jboss.deploy}/${project.name}.war”>
    <fileset dir=”${dir.deploy.local}/..” includes=”**/*.html,**/*.jsp”/>
    </copy>
    </target>

    <!– ===== Run automated JUnit tests ===== –>
    <target name=”junit” depends=”compile” description=”Run JUnit tests”>
    <junit printsummary=”on” fork=”true” haltonfailure=”false” failureproperty=”tests.failed” showoutput=”true”>
    <classpath>
    <path location=”${dir.test.home}” />
    <path location=”${dir.test.conf}” />
    <path location=”${master.dir.conf}” />
    <path location=”${dir.jsp}”/> <!– So StrutsTestCase can find web.xml –>

    <fileset dir=”${dir.test.home}”>
    <include name=”**/*.class”/>
    </fileset>
    <fileset dir=”${dir.lib}”>
    <include name=”**/*.jar”/>
    <include name=”**/*.zip”/> <!– whoa! Oracle driver is in as a ZIP file! –>
    </fileset>
    </classpath>
    <formatter type=”brief” usefile=”false”/>

    <batchtest>
    <fileset dir=”${dir.test.home}”>
    <include name=”**/AllTests.*”/>
    </fileset>
    </batchtest>
    </junit>

    <fail if=”tests.failed”>

    ***********************************************************
    ***********************************************************
    **** One or more tests failed! Check the output … ****
    ***********************************************************
    ***********************************************************
    </fail>
    </target>

    <!– ==================== PMD Targets ================================== –>
    <import file=”../HIG-Master/build-pmd.xml”/>

    </project>

    #261719 Reply

    Riyad Kalla
    Member

    Carlos,
    If you don’t see a “Java Build Path” preference panel under your project properties, then your project is most likely a Simple Project. There is no direct migration path from Simple to Java project. What might have happened is if you checked this project into source control then checked it back out, it’s possible you forgot to check the .project file in, so when you pulled it back out, it got a default simple project project file and not the Java .project file.

    #261734 Reply

    SwingCarlos
    Participant

    So, I used XP Windows restore to get my .classpath and .project files back. And I still am not getting the “Java Build Path”
    options under Properties. Is there any other tricks to getting the Properties->Java Build Path options back?

    Carlos

    #261760 Reply

    Riyad Kalla
    Member

    Carlos,
    Try opening your .project file, you should see a Java nature added to the project, if you don’t, then it looks like this project may have never been a Java project on this particular computer.

    Experimental, Please Backup Your Project
    What I might try doing (if I were you) is creating a new Java project, then comparing the two .project and .classpath files and see if you can manually doctor the broken one until it works.

    The fastest way to success is simply creating a new Java project then dragging and dropping your source files from the broken project into the new project, but I don’t know if that will work in your environment.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: ContentAssist-CodeAssist /Java Build Path Options

You must be logged in to post in the forum log in