mantisconnect-cvs Mailing List for MantisConnect (Page 4)
Brought to you by:
vboctor
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(20) |
Oct
(16) |
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(7) |
Mar
(7) |
Apr
|
May
(19) |
Jun
(22) |
Jul
(1) |
Aug
(2) |
Sep
(63) |
Oct
(1) |
Nov
|
Dec
(4) |
2006 |
Jan
|
Feb
(11) |
Mar
(26) |
Apr
(22) |
May
(13) |
Jun
|
Jul
|
Aug
(34) |
Sep
(15) |
Oct
(28) |
Nov
(7) |
Dec
|
2007 |
Jan
(14) |
Feb
|
Mar
(23) |
Apr
(3) |
May
(3) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(4) |
2008 |
Jan
(11) |
Feb
(34) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(7) |
2011 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <vb...@us...> - 2007-04-22 00:35:16
|
Revision: 134 http://svn.sourceforge.net/mantisconnect/?rev=134&view=rev Author: vboctor Date: 2007-04-21 17:35:14 -0700 (Sat, 21 Apr 2007) Log Message: ----------- Fixed #324: Notice in Line 225 in File mc_api.php: $t_user_id is not defined. Modified Paths: -------------- mantisconnect/trunk/webservice/mc/mc_api.php Modified: mantisconnect/trunk/webservice/mc/mc_api.php =================================================================== --- mantisconnect/trunk/webservice/mc/mc_api.php 2007-03-27 20:27:37 UTC (rev 133) +++ mantisconnect/trunk/webservice/mc/mc_api.php 2007-04-22 00:35:14 UTC (rev 134) @@ -222,7 +222,7 @@ function mci_user_get_accessible_subprojects( $p_user_id, $p_parent_project_id ) { $t_result = array(); - foreach( user_get_accessible_subprojects( $t_user_id, $p_parent_project_id ) as $t_subproject_id ) { + foreach( user_get_accessible_subprojects( $p_user_id, $p_parent_project_id ) as $t_subproject_id ) { $t_subproject_row = project_cache_row( $t_subproject_id ); $t_subproject = array(); $t_subproject['id'] = $t_subproject_id; @@ -272,4 +272,86 @@ return $rows; } -?> \ No newline at end of file + # set up error_handler() as the new default error handling function + set_error_handler( 'mc_error_handler' ); + + ######################################### + # SECURITY NOTE: these globals are initialized here to prevent them + # being spoofed if register_globals is turned on + # + $g_error_parameters = array(); + $g_error_handled = false; + $g_error_proceed_url = null; + + # --------------- + # Default error handler + # + # This handler will not receive E_ERROR, E_PARSE, E_CORE_*, or E_COMPILE_* + # errors. + # + # E_USER_* are triggered by us and will contain an error constant in $p_error + # The others, being system errors, will come with a string in $p_error + # + function mc_error_handler( $p_type, $p_error, $p_file, $p_line, $p_context ) { + global $g_error_parameters, $g_error_handled, $g_error_proceed_url; + global $g_lang_overrides; + global $g_error_send_page_header; + + # check if errors were disabled with @ somewhere in this call chain + # also suppress php 5 strict warnings + if ( 0 == error_reporting() || 2048 == $p_type ) { + return; + } + + $t_lang_pushed = false; + + # flush any language overrides to return to user's natural default + if ( function_exists( 'db_is_connected' ) ) { + if ( db_is_connected() ) { + lang_push( lang_get_default() ); + $t_lang_pushed = true; + } + } + + $t_short_file = basename( $p_file ); + $t_method_array = config_get( 'display_errors' ); + if ( isset( $t_method_array[$p_type] ) ) { + $t_method = $t_method_array[$p_type]; + } else { + $t_method = 'none'; + } + + # build an appropriate error string + switch ( $p_type ) { + case E_WARNING: + $t_error_type = 'SYSTEM WARNING'; + $t_error_description = $p_error; + break; + case E_NOTICE: + $t_error_type = 'SYSTEM NOTICE'; + $t_error_description = $p_error; + break; + case E_USER_ERROR: + $t_error_type = "APPLICATION ERROR #$p_error"; + $t_error_description = error_string( $p_error ); + break; + case E_USER_WARNING: + $t_error_type = "APPLICATION WARNING #$p_error"; + $t_error_description = error_string( $p_error ); + break; + case E_USER_NOTICE: + # used for debugging + $t_error_type = 'DEBUG'; + $t_error_description = $p_error; + break; + default: + #shouldn't happen, just display the error just in case + $t_error_type = ''; + $t_error_description = $p_error; + } + + $t_error_description = nl2br( $t_error_description ); + + return new soap_fault( 'Server', '', $t_error_type . ': ' . $t_error_description ); + } +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-27 20:27:39
|
Revision: 133 http://svn.sourceforge.net/mantisconnect/?rev=133&view=rev Author: planser Date: 2007-03-27 13:27:37 -0700 (Tue, 27 Mar 2007) Log Message: ----------- Fixed #0000319: Cannot add issues for subprojects Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/IMCSession.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/axis/MCSession.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/axis/Project.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/model/IProject.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/model/Project.java mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/AllTests.java mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/ant/taskdefs/MockSession.java mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MCSessionTest.java Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/IMCSession.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/IMCSession.java 2007-03-27 09:02:46 UTC (rev 132) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/IMCSession.java 2007-03-27 20:27:37 UTC (rev 133) @@ -309,4 +309,16 @@ * Delete the relationship for the specified issue. */ public boolean deleteRelationship(long issueId, long relationshipId) throws MCException; + + /** + * Returns the project with id <code>projectId.</code> Subprojects are + * included (recursively) in the search. + */ + public IProject getProject(long projectId) throws MCException; + + /** + * Returns the project with name <code>name.</code> Subprojects are + * included (recursively) in the search. + */ + public IProject getProject(String name) throws MCException; } Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/axis/MCSession.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/axis/MCSession.java 2007-03-27 09:02:46 UTC (rev 132) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/axis/MCSession.java 2007-03-27 20:27:37 UTC (rev 133) @@ -787,20 +787,45 @@ issue.setSeverity(getDefaultIssueSeverity()); issue.setPriority(getDefaultIssuePriority()); issue.setPrivate(getDefaultIssueViewState() == Viewstate.PRIVATE); - issue.setProject(getProject(projectId)); + IProject project = getProject(projectId); + if (project != null) { + issue.setProject(new MCAttribute(new ObjectRef(Utilities.toBigInteger(project.getId()), + project.getName()))); + } else { + throw new MCException("Project ID '" + projectId + "' not found."); + } return issue; } - protected MCAttribute getProject(long projectId) throws MCException { + public IProject getProject(long projectId) throws MCException { IProject[] projects = getAccessibleProjects(); for (int i = 0; i < projects.length; i++) { if (projects[i].getId() == projectId) { - return new MCAttribute(new ObjectRef(Utilities.toBigInteger(projects[i].getId()), - projects[i].getName())); + return projects[i]; + } else { + IProject project = projects[i].getSubProject(projectId); + if (project != null) { + return project; + } } } return null; } + + public IProject getProject(String name) throws MCException { + IProject[] projects = getAccessibleProjects(); + for (int i = 0; i < projects.length; i++) { + if (name.equals(projects[i].getName())) { + return projects[i]; + } else { + IProject project = projects[i].getSubProject(name); + if (project != null) { + return project; + } + } + } + return null; + } public INote newNote(String text) throws MCException { Note note = new Note(); Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/axis/Project.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/axis/Project.java 2007-03-27 09:02:46 UTC (rev 132) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/axis/Project.java 2007-03-27 20:27:37 UTC (rev 133) @@ -124,4 +124,39 @@ public void setSubProjects(IProject[] subProjects) { data.setSubprojects(Utilities.toProjectDataArray(subProjects)); } + + public IProject getSubProject(long projectId) { + IProject[] subProjects = getSubProjects(); + if (subProjects != null) { + for (int i = 0; i < subProjects.length; i++) { + if (subProjects[i].getId() == projectId) { + return subProjects[i]; + } else { + IProject subProject = subProjects[i].getSubProject(projectId); + if (subProject != null) { + return subProject; + } + } + } + } + return null; + } + + public IProject getSubProject(String name) { + IProject[] subProjects = getSubProjects(); + if (subProjects != null) { + for (int i = 0; i < subProjects.length; i++) { + if (name.equals(subProjects[i].getName())) { + return subProjects[i]; + } else { + IProject subProject = subProjects[i].getSubProject(name); + if (subProject != null) { + return subProject; + } + } + } + } + return null; + } + } Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/model/IProject.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/model/IProject.java 2007-03-27 09:02:46 UTC (rev 132) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/model/IProject.java 2007-03-27 20:27:37 UTC (rev 133) @@ -50,4 +50,8 @@ public void setPrivate(boolean isPrivate); + public IProject getSubProject(long projectId); + + public IProject getSubProject(String name); + } Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/model/Project.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/model/Project.java 2007-03-27 09:02:46 UTC (rev 132) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/model/Project.java 2007-03-27 20:27:37 UTC (rev 133) @@ -116,6 +116,40 @@ public void setId(int id) { this.id = id; } + + public IProject getSubProject(long projectId) { + IProject[] subProjects = getSubProjects(); + if (subProjects != null) { + for (int i = 0; i < subProjects.length; i++) { + if (subProjects[i].getId() == projectId) { + return subProjects[i]; + } else { + IProject subProject = subProjects[i].getSubProject(projectId); + if (subProject != null) { + return subProject; + } + } + } + } + return null; + } + + public IProject getSubProject(String name) { + IProject[] subProjects = getSubProjects(); + if (subProjects != null) { + for (int i = 0; i < subProjects.length; i++) { + if (name.equals(subProjects[i].getName())) { + return subProjects[i]; + } else { + IProject subProject = subProjects[i].getSubProject(name); + if (subProject != null) { + return subProject; + } + } + } + } + return null; + } public int hashCode() { final int PRIME = 31; Modified: mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/AllTests.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/AllTests.java 2007-03-27 09:02:46 UTC (rev 132) +++ mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/AllTests.java 2007-03-27 20:27:37 UTC (rev 133) @@ -19,6 +19,7 @@ import org.mantisbt.connect.ant.taskdefs.VersionAddTaskTest; import org.mantisbt.connect.ant.taskdefs.VersionDeleteTaskTest; import org.mantisbt.connect.ant.taskdefs.VersionUpdateTaskTest; +import org.mantisbt.connect.axis.MCSessionTest; import org.mantisbt.connect.axis.MantisConnectPortTypeTest; import org.mantisbt.connect.text.CheckboxCustomFieldFormatTest; import org.mantisbt.connect.text.DateCustomFieldFormatTest; @@ -35,6 +36,7 @@ // $JUnit-BEGIN$ suite.addTestSuite(MantisConnectPortTypeTest.class); suite.addTestSuite(SessionTest.class); + suite.addTestSuite(MCSessionTest.class); suite.addTestSuite(MantisConnectTaskTest.class); suite.addTestSuite(IssueSubmitTaskTest.class); suite.addTestSuite(VersionAddTaskTest.class); Modified: mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/ant/taskdefs/MockSession.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/ant/taskdefs/MockSession.java 2007-03-27 09:02:46 UTC (rev 132) +++ mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/ant/taskdefs/MockSession.java 2007-03-27 20:27:37 UTC (rev 133) @@ -257,4 +257,12 @@ return delegate.updateVersion(version); } + public IProject getProject(long projectId) throws MCException { + return delegate.getProject(projectId); + } + + public IProject getProject(String name) throws MCException { + return delegate.getProject(name); + } + } Modified: mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MCSessionTest.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MCSessionTest.java 2007-03-27 09:02:46 UTC (rev 132) +++ mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MCSessionTest.java 2007-03-27 20:27:37 UTC (rev 133) @@ -23,6 +23,7 @@ import org.mantisbt.connect.Viewstate; import org.mantisbt.connect.model.IIssue; import org.mantisbt.connect.model.INote; +import org.mantisbt.connect.model.IProject; /** * @author Peter Lanser, pl...@us... @@ -119,8 +120,6 @@ returnValue(new ObjectRef[] { severity })); mockPortType.expects(exactly(1)).method("mc_enum_priorities").with(eq(user), eq(pwd)).will( returnValue(new ObjectRef[] { priority })); - mockPortType.expects(exactly(1)).method("mc_enum_view_states").with(eq(user), eq(pwd)) - .will(returnValue(new ObjectRef[] { viewState })); mockPortType.expects(exactly(1)).method("mc_config_get_string").with(eq(user), eq(pwd), eq("default_bug_severity")).will(returnValue(severity.getId().toString())); mockPortType.expects(exactly(1)).method("mc_config_get_string").with(eq(user), eq(pwd), @@ -131,8 +130,6 @@ eq(pwd)).will(returnValue(new ProjectData[] { project })); try { IIssue issue = session.newIssue(project.getId().longValue()); - System.out.println(issue.getProject().getId() + " " + issue.getProject().getName()); - System.out.println(project.getId() + " " + project.getName()); assertEquals(new MCAttribute(new ObjectRef(project.getId(), project.getName())), issue.getProject()); assertEquals(new MCAttribute(severity), issue.getSeverity()); assertEquals(new MCAttribute(priority), issue.getPriority()); @@ -158,5 +155,24 @@ fail(e.getMessage()); } } + + public void testGetProject() { + Mock mockPortType = mock(MantisConnectPortType.class); + String user = "aUser"; + String pwd = "aPwd"; + ProjectData project = new ProjectData(); + project.setId(BigInteger.valueOf(1)); + project.setName("AProject"); + IMCSession session = new MCSession((MantisConnectPortType) mockPortType.proxy(), user, pwd); + mockPortType.expects(exactly(1)).method("mc_projects_get_user_accessible").with(eq(user), + eq(pwd)).will(returnValue(new ProjectData[] { project })); + try { + IProject first = session.getProject(1); + IProject second = session.getProject("AProject"); + assertEquals(first, second); + } catch (MCException e) { + fail(e.getMessage()); + } + } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-27 09:02:47
|
Revision: 132 http://svn.sourceforge.net/mantisconnect/?rev=132&view=rev Author: planser Date: 2007-03-27 02:02:46 -0700 (Tue, 27 Mar 2007) Log Message: ----------- Added Paths: ----------- mantisconnect/branches/clients/java/eclipse/org.mantisbt.connect.eclipse/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-27 09:00:29
|
Revision: 131 http://svn.sourceforge.net/mantisconnect/?rev=131&view=rev Author: planser Date: 2007-03-27 02:00:25 -0700 (Tue, 27 Mar 2007) Log Message: ----------- Added Paths: ----------- mantisconnect/branches/clients/java/eclipse/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-27 08:58:28
|
Revision: 130 http://svn.sourceforge.net/mantisconnect/?rev=130&view=rev Author: planser Date: 2007-03-27 01:58:27 -0700 (Tue, 27 Mar 2007) Log Message: ----------- Added Paths: ----------- mantisconnect/branches/clients/java/client-api/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-27 08:56:47
|
Revision: 129 http://svn.sourceforge.net/mantisconnect/?rev=129&view=rev Author: planser Date: 2007-03-27 01:56:46 -0700 (Tue, 27 Mar 2007) Log Message: ----------- Added Paths: ----------- mantisconnect/branches/clients/java/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-27 08:55:13
|
Revision: 128 http://svn.sourceforge.net/mantisconnect/?rev=128&view=rev Author: planser Date: 2007-03-27 01:55:12 -0700 (Tue, 27 Mar 2007) Log Message: ----------- Added Paths: ----------- mantisconnect/branches/clients/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-27 08:54:11
|
Revision: 127 http://svn.sourceforge.net/mantisconnect/?rev=127&view=rev Author: planser Date: 2007-03-27 01:54:09 -0700 (Tue, 27 Mar 2007) Log Message: ----------- Added Paths: ----------- mantisconnect/branches/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-26 19:40:36
|
Revision: 126 http://svn.sourceforge.net/mantisconnect/?rev=126&view=rev Author: planser Date: 2007-03-26 12:40:35 -0700 (Mon, 26 Mar 2007) Log Message: ----------- Modified Paths: -------------- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/README.txt Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/README.txt =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/README.txt 2007-03-26 19:34:08 UTC (rev 125) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/README.txt 2007-03-26 19:40:35 UTC (rev 126) @@ -4,8 +4,9 @@ 1. Overview 2. Requirements -3. Building the source distribution -4. Installation +3. Compatibility - Versioning schema +4. Building the source distribution +5. Installation 1. Overview =========== @@ -26,7 +27,27 @@ org.eclipse.core.runtime org.eclipse.ui.forms -3. Building the source distribution +3. Compatibility - Versioning schema +==================================== + +The version label for the Eclipse plugin consists of four parts: + +<ws-major>.<ws-minor>.<plugin-major>.<plugins-minor> + +ws-major: The major number of the webservice the Client API is + compatible with +ws-minor: The minor number of the webservice the Client API is + compatible with +plugin-major: Stands for API changes within the plugin +plugin-minor: Stands for bugfixes within the plugin (no API changes) + +This is version 1.1.1.0 which means that it's compatible with webservices +versioned 1.1 respectively 1.1.x (first two parts). +It is the first version of the Eclipse plugin (1.0 - the second two parts). + +The next bugfix release for the Eclipse plugin would be named 1.1.1.1. + +4. Building the source distribution =================================== The source distribution comes with an Ant build file (build.xml). @@ -34,7 +55,7 @@ plugin. Possibly you have to adjust the value of eclipse.home in build.properties to your needs. -4. Installation +5. Installation =============== - Unpack content of the archive file into <eclipse-home>/plugins This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-26 19:21:42
|
Revision: 124 http://svn.sourceforge.net/mantisconnect/?rev=124&view=rev Author: planser Date: 2007-03-26 12:21:41 -0700 (Mon, 26 Mar 2007) Log Message: ----------- Updated copyright statement Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/Enumeration.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ISession.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ISessionFactory.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/JMTException.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/JMTTransportClientProperties.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/MCException.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/SessionFactory.java Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/Enumeration.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/Enumeration.java 2007-03-26 19:11:46 UTC (rev 123) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/Enumeration.java 2007-03-26 19:21:41 UTC (rev 124) @@ -1,5 +1,5 @@ /* - * Copyright 2005 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ISession.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ISession.java 2007-03-26 19:11:46 UTC (rev 123) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ISession.java 2007-03-26 19:21:41 UTC (rev 124) @@ -1,5 +1,5 @@ /* - * Copyright 2005 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ISessionFactory.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ISessionFactory.java 2007-03-26 19:11:46 UTC (rev 123) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ISessionFactory.java 2007-03-26 19:21:41 UTC (rev 124) @@ -1,5 +1,5 @@ /* - * Copyright 2005 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/JMTException.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/JMTException.java 2007-03-26 19:11:46 UTC (rev 123) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/JMTException.java 2007-03-26 19:21:41 UTC (rev 124) @@ -1,5 +1,5 @@ /* - * Copyright 2005 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/JMTTransportClientProperties.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/JMTTransportClientProperties.java 2007-03-26 19:11:46 UTC (rev 123) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/JMTTransportClientProperties.java 2007-03-26 19:21:41 UTC (rev 124) @@ -1,5 +1,5 @@ /* - * Copyright 2005 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/MCException.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/MCException.java 2007-03-26 19:11:46 UTC (rev 123) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/MCException.java 2007-03-26 19:21:41 UTC (rev 124) @@ -1,5 +1,5 @@ /* - * Copyright 2005 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/SessionFactory.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/SessionFactory.java 2007-03-26 19:11:46 UTC (rev 123) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/SessionFactory.java 2007-03-26 19:21:41 UTC (rev 124) @@ -1,5 +1,5 @@ /* - * Copyright 2005 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-26 19:11:48
|
Revision: 123 http://svn.sourceforge.net/mantisconnect/?rev=123&view=rev Author: planser Date: 2007-03-26 12:11:46 -0700 (Mon, 26 Mar 2007) Log Message: ----------- Updated copyright statement Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/AccessLevel.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/CustomFieldType.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/RelationshipType.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/Viewstate.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/CustomField.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/CheckboxCustomFieldFormat.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/CustomFieldFormat.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/CustomFieldFormatException.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/DateCustomFieldFormat.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/ICustomFieldFormat.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/ListCustomFieldFormat.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/StringCustomFieldFormat.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultIssueCreator.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultSessionProvider.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultSubmitter.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/IIssueCreator.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/IIssueSubmitListener.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/IIssueUiPart.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/ISessionChangeListener.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/ISessionProvider.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/ISubmitter.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/Messages.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AbstractIssueUiPart.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AdvancedPart.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AttachmentsPart.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/GeneralPart.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/ISwingIssueUiPart.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitFrame.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitPanel.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/NotePart.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/SettingsDialog.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/SwingUtilities.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/SwingWorker.java mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/CheckboxCustomFieldFormatTest.java mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/DateCustomFieldFormatTest.java mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/ListCustomFieldFormatTest.java mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/StringCustomFieldFormatTest.java Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/AccessLevel.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/AccessLevel.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/AccessLevel.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/CustomFieldType.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/CustomFieldType.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/CustomFieldType.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/RelationshipType.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/RelationshipType.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/RelationshipType.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/Viewstate.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/Viewstate.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/Viewstate.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/CustomField.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/CustomField.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/CustomField.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/CheckboxCustomFieldFormat.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/CheckboxCustomFieldFormat.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/CheckboxCustomFieldFormat.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/CustomFieldFormat.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/CustomFieldFormat.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/CustomFieldFormat.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/CustomFieldFormatException.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/CustomFieldFormatException.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/CustomFieldFormatException.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/DateCustomFieldFormat.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/DateCustomFieldFormat.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/DateCustomFieldFormat.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/ICustomFieldFormat.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/ICustomFieldFormat.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/ICustomFieldFormat.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/ListCustomFieldFormat.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/ListCustomFieldFormat.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/ListCustomFieldFormat.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/StringCustomFieldFormat.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/StringCustomFieldFormat.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/text/StringCustomFieldFormat.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultIssueCreator.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultIssueCreator.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultIssueCreator.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultSessionProvider.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultSessionProvider.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultSessionProvider.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultSubmitter.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultSubmitter.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultSubmitter.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/IIssueCreator.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/IIssueCreator.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/IIssueCreator.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/IIssueSubmitListener.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/IIssueSubmitListener.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/IIssueSubmitListener.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/IIssueUiPart.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/IIssueUiPart.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/IIssueUiPart.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/ISessionChangeListener.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/ISessionChangeListener.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/ISessionChangeListener.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/ISessionProvider.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/ISessionProvider.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/ISessionProvider.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/ISubmitter.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/ISubmitter.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/ISubmitter.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/Messages.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/Messages.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/Messages.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AbstractIssueUiPart.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AbstractIssueUiPart.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AbstractIssueUiPart.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AdvancedPart.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AdvancedPart.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AdvancedPart.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AttachmentsPart.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AttachmentsPart.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AttachmentsPart.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/GeneralPart.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/GeneralPart.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/GeneralPart.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/ISwingIssueUiPart.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/ISwingIssueUiPart.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/ISwingIssueUiPart.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitFrame.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitFrame.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitFrame.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitPanel.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitPanel.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitPanel.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/NotePart.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/NotePart.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/NotePart.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/SettingsDialog.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/SettingsDialog.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/SettingsDialog.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/SwingUtilities.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/SwingUtilities.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/SwingUtilities.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/SwingWorker.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/SwingWorker.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/SwingWorker.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2007, 2006 Peter Lanser + * Copyright 2007, 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/CheckboxCustomFieldFormatTest.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/CheckboxCustomFieldFormatTest.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/CheckboxCustomFieldFormatTest.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/DateCustomFieldFormatTest.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/DateCustomFieldFormatTest.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/DateCustomFieldFormatTest.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/ListCustomFieldFormatTest.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/ListCustomFieldFormatTest.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/ListCustomFieldFormatTest.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * Modified: mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/StringCustomFieldFormatTest.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/StringCustomFieldFormatTest.java 2007-03-26 19:05:56 UTC (rev 122) +++ mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/StringCustomFieldFormatTest.java 2007-03-26 19:11:46 UTC (rev 123) @@ -1,5 +1,5 @@ /* - * Copyright 2006 Peter Lanser + * Copyright 2007 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-26 19:05:58
|
Revision: 122 http://svn.sourceforge.net/mantisconnect/?rev=122&view=rev Author: planser Date: 2007-03-26 12:05:56 -0700 (Mon, 26 Mar 2007) Log Message: ----------- Fixed typo Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/README.txt Modified: mantisconnect/trunk/clients/java/client-api/README.txt =================================================================== --- mantisconnect/trunk/clients/java/client-api/README.txt 2007-03-26 19:04:38 UTC (rev 121) +++ mantisconnect/trunk/clients/java/client-api/README.txt 2007-03-26 19:05:56 UTC (rev 122) @@ -141,7 +141,7 @@ A first attempt could be something like this: -Issue issue = new Issue(); +IIssue issue = new Issue(); However, a much better approach is to use the newIssue(int projectId) method of org.mantisbt.connect.IMCSession. The advantage of this method is that it sets This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-26 16:40:30
|
Revision: 120 http://svn.sourceforge.net/mantisconnect/?rev=120&view=rev Author: planser Date: 2007-03-26 09:40:23 -0700 (Mon, 26 Mar 2007) Log Message: ----------- Updated version labels Modified Paths: -------------- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/build.xml Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/build.xml =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/build.xml 2007-03-24 11:20:39 UTC (rev 119) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/build.xml 2007-03-26 16:40:23 UTC (rev 120) @@ -5,6 +5,8 @@ <property name="baseos" value="${os}"/> <property name="basearch" value="${arch}"/> <property name="basenl" value="${nl}"/> + + <property name="version" value="1.1.1.0-SVN"/> <!-- Compiler settings. --> <property name="javacFailOnError" value="false"/> @@ -46,7 +48,7 @@ <antcall target="gather.bin.parts"> <param name="destination.temp.folder" value="${temp.folder}/"/> </antcall> - <zip destfile="${plugin.destination}/org.mantisbt.connect.eclipse_0.0.6.jar" basedir="${temp.folder}/org.mantisbt.connect.eclipse_0.0.6" filesonly="false" whenempty="skip" update="false"/> + <zip destfile="${plugin.destination}/org.mantisbt.connect.eclipse_${version}.jar" basedir="${temp.folder}/org.mantisbt.connect.eclipse_${version}" filesonly="false" whenempty="skip" update="false"/> <delete dir="${temp.folder}"/> </target> @@ -80,7 +82,7 @@ <pathelement path="lib/commons-logging-1.0.4.jar"/> <pathelement path="lib/jaxrpc.jar"/> <pathelement path="lib/log4j-1.2.8.jar"/> - <pathelement path="lib/mantisconnect-client-api-0.0.6.jar"/> + <pathelement path="lib/mantisconnect-client-api-${version}.jar"/> <pathelement path="lib/saaj.jar"/> <pathelement path="lib/wsdl4j-1.5.1.jar"/> <pathelement path="lib/swtcalendar.jar"/> @@ -114,11 +116,11 @@ </target> <target name="gather.bin.parts" depends="init" if="destination.temp.folder"> - <mkdir dir="${destination.temp.folder}/org.mantisbt.connect.eclipse_0.0.6"/> - <copy todir="${destination.temp.folder}/org.mantisbt.connect.eclipse_0.0.6" failonerror="true" overwrite="false"> + <mkdir dir="${destination.temp.folder}/org.mantisbt.connect.eclipse_${version}"/> + <copy todir="${destination.temp.folder}/org.mantisbt.connect.eclipse_${version}" failonerror="true" overwrite="false"> <fileset dir="${build.result.folder}" includes="mantisconnect.jar" /> </copy> - <copy todir="${destination.temp.folder}/org.mantisbt.connect.eclipse_0.0.6" failonerror="true" overwrite="false"> + <copy todir="${destination.temp.folder}/org.mantisbt.connect.eclipse_${version}" failonerror="true" overwrite="false"> <fileset dir="${basedir}" includes="META-INF/,icons/,lib/,mantis.jar,mantissrc.zip,plugin.xml,NOTICE.txt,LICENSE.txt,mantisconnect.jar,README.txt" /> </copy> </target> @@ -127,20 +129,20 @@ </target> <target name="gather.sources" depends="init" if="destination.temp.folder"> - <mkdir dir="${destination.temp.folder}/org.mantisbt.connect.eclipse_0.0.6"/> - <copy file="${build.result.folder}/mantisconnectsrc.zip" todir="${destination.temp.folder}/org.mantisbt.connect.eclipse_0.0.6" failonerror="false" overwrite="false"/> + <mkdir dir="${destination.temp.folder}/org.mantisbt.connect.eclipse_${version}"/> + <copy file="${build.result.folder}/mantisconnectsrc.zip" todir="${destination.temp.folder}/org.mantisbt.connect.eclipse_${version}" failonerror="false" overwrite="false"/> </target> <target name="gather.logs" depends="init" if="destination.temp.folder"> - <mkdir dir="${destination.temp.folder}/org.mantisbt.connect.eclipse_0.0.6"/> - <copy file="${temp.folder}/mantisconnect.jar.bin.log" todir="${destination.temp.folder}/org.mantisbt.connect.eclipse_0.0.6" failonerror="false" overwrite="false"/> + <mkdir dir="${destination.temp.folder}/org.mantisbt.connect.eclipse_${version}"/> + <copy file="${temp.folder}/mantisconnect.jar.bin.log" todir="${destination.temp.folder}/org.mantisbt.connect.eclipse_${version}" failonerror="false" overwrite="false"/> </target> <target name="clean" depends="init" description="Clean the plug-in: org.mantisbt.connect.eclipse of all the zips, jars and logs created."> <delete file="${build.result.folder}/mantisconnect.jar"/> <delete file="${build.result.folder}/mantisconnectsrc.zip"/> - <delete file="${plugin.destination}/org.mantisbt.connect.eclipse_0.0.6.jar"/> - <delete file="${plugin.destination}/org.mantisbt.connect.eclipse_0.0.6.zip"/> + <delete file="${plugin.destination}/org.mantisbt.connect.eclipse_${version}.jar"/> + <delete file="${plugin.destination}/org.mantisbt.connect.eclipse_${version}.zip"/> <delete dir="${temp.folder}"/> </target> @@ -163,7 +165,7 @@ <delete> <fileset dir="${temp.folder}" includes="**/*.bin.log" /> </delete> - <zip destfile="${plugin.destination}/org.mantisbt.connect.eclipse_0.0.6.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/> + <zip destfile="${plugin.destination}/org.mantisbt.connect.eclipse_${version}.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/> <delete dir="${temp.folder}"/> </target> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-24 11:20:40
|
Revision: 119 http://svn.sourceforge.net/mantisconnect/?rev=119&view=rev Author: planser Date: 2007-03-24 04:20:39 -0700 (Sat, 24 Mar 2007) Log Message: ----------- Exporting new packages Modified Paths: -------------- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/META-INF/MANIFEST.MF Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/META-INF/MANIFEST.MF =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/META-INF/MANIFEST.MF 2007-03-24 11:12:49 UTC (rev 118) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/META-INF/MANIFEST.MF 2007-03-24 11:20:39 UTC (rev 119) @@ -22,11 +22,14 @@ lib/wsdl4j-1.5.1.jar, lib/swtcalendar.jar, lib/mantisconnect-client-api-1.1.1.0-SVN.jar -Export-Package: org.mantisbt.connect, +Export-Package: com.ibm.wsdl, + org.mantisbt.connect, org.mantisbt.connect.eclipse, org.mantisbt.connect.eclipse.actions, org.mantisbt.connect.eclipse.dialogs, org.mantisbt.connect.eclipse.editors, org.mantisbt.connect.eclipse.preferences, org.mantisbt.connect.eclipse.util, - org.mantisbt.connect.eclipse.views + org.mantisbt.connect.eclipse.views, + org.mantisbt.connect.model, + org.mantisbt.connect.text This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-24 11:06:30
|
Revision: 117 http://svn.sourceforge.net/mantisconnect/?rev=117&view=rev Author: planser Date: 2007-03-24 04:06:28 -0700 (Sat, 24 Mar 2007) Log Message: ----------- Fixed #0000316: org.mantisbt.connect.ISession depends on types generated by wsdl4java Added Paths: ----------- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/IMCSession.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/MCException.java mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/ant/taskdefs/MockSession.java Added: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/IMCSession.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/IMCSession.java (rev 0) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/IMCSession.java 2007-03-24 11:06:28 UTC (rev 117) @@ -0,0 +1,312 @@ +/* + * Copyright 2007 Peter Lanser + * + * MantisConnect is copyrighted to Victor Boctor + * + * This program is distributed under the terms and conditions of the GPL + * See LICENSE file for details. + * + * For commercial applications to link with or modify MantisConnect, they + * require the purchase of a MantisConnect commercial license. + */ +package org.mantisbt.connect; + +import org.mantisbt.connect.model.IAccount; +import org.mantisbt.connect.model.ICustomFieldDefinition; +import org.mantisbt.connect.model.IFilter; +import org.mantisbt.connect.model.IIssue; +import org.mantisbt.connect.model.IIssueHeader; +import org.mantisbt.connect.model.IMCAttribute; +import org.mantisbt.connect.model.INote; +import org.mantisbt.connect.model.IProject; +import org.mantisbt.connect.model.IProjectAttachment; +import org.mantisbt.connect.model.IProjectVersion; +import org.mantisbt.connect.model.IRelationship; + +/** + * @author Peter Lanser, pl...@us... + */ +public interface IMCSession { + + /** + * Flush cached information + */ + public void flush(); + + /** + * Create a new Issue with default values set. + */ + public IIssue newIssue(long projectId) throws MCException; + + /** + * Create a new Note with default values set. + */ + public INote newNote(String text) throws MCException; + + /** + * Get Version of MantisConnect this session is connected to. + */ + public String getVersion() throws MCException; + + /** + * Get the specified enumeration. + */ + public IMCAttribute[] getEnum(Enumeration enumeration) throws MCException; + + /** + * Get the specified enumeration. + */ + public String getEnum(String enumeration) throws MCException; + + /** + * Check there exists an issue with the specified id. + */ + public boolean issueExists(long issueId) throws MCException; + + /** + * Get the issue with the specified id. + */ + public IIssue getIssue(long issueId) throws MCException; + + /** + * Get the latest submitted issue in the specified project. + */ + public long getBiggestIssueId(long projectId) throws MCException; + + /** + * Get the id of the issue with the specified summary. + */ + public long getIdFromSummary(String summary) throws MCException; + + /** + * Submit the specified issue. + */ + public long addIssue(IIssue issue) throws MCException; + + /** + * Submit a new note. + */ + public long addNote(long issueId, INote note) throws MCException; + + /** + * Delete the issue with the specified id. + */ + public boolean deleteIssue(long issueId) throws MCException; + + /** + * Add a new project to the tracker (must have admin privileges). + */ + public long addProject(IProject project) throws MCException; + + /** + * Delete the project with the specified id (must have admin privileges). + */ + public boolean deleteProject(long projectId) throws MCException; + + /** + * Get the list of projects that are accessible to the logged in user. + */ + public IProject[] getAccessibleProjects() throws MCException; + + /** + * Get the categories belonging to the specified project. + */ + public String[] getCategories(long projectId) throws MCException; + + /** + * Get the versions belonging to the specified project. + */ + public IProjectVersion[] getVersions(long projectId) throws MCException; + + /** + * Get the released versions that belong to the specified project. + */ + public IProjectVersion[] getReleasedVersions(long projectId) throws MCException; + + /** + * Get the unreleased version that belong to the specified project. + */ + public IProjectVersion[] getUnreleasedVersions(long projectId) throws MCException; + + /** + * Get the filters defined for the specified project. + */ + public IFilter[] getFilters(long projectId) throws MCException; + + /** + * Get all issues that match the specified filter. + */ + public IIssue[] getIssues(long projectId, long filterId) throws MCException; + + /** + * Get issues that match the specified filter. Constrain the number of + * issues to <code>limit</code>. + */ + public IIssue[] getIssues(long projectId, long filterId, int limit) throws MCException; + + /** + * Get all issues that match the specified filter and paging details. + */ + public IIssue[] getIssues(long projectId, long filterId, int pageNumber, int perPage) + throws MCException; + + /** + * Get all issue headers that match the specified filter. + */ + public IIssueHeader[] getIssueHeaders(long projectId, long filterId) throws MCException; + + /** + * Get issue headers that match the specified filter. Constrain the number + * of issues to <code>limit</code>. + */ + public IIssueHeader[] getIssueHeaders(long projectId, long filterId, int limit) + throws MCException; + + /** + * Get all issue headers that match the specified filter and paging details. + */ + public IIssueHeader[] getIssueHeaders(long projectId, long filterId, int pageNumber, int perPage) + throws MCException; + + /** + * Get all issues that match the specified project. + */ + public IIssue[] getProjectIssues(long projectId) throws MCException; + + /** + * Get the issues that match the specified project id and paging details + * Constrain the number of issues to <code>limit</code>. + */ + public IIssue[] getProjectIssues(long projectId, int limit) throws MCException; + + /** + * Get the issues that match the specified project id and paging details + */ + public IIssue[] getProjectIssues(long projectId, int pageNumber, int perPage) + throws MCException; + + /** + * Get all issue headers that match the specified project. + */ + public IIssueHeader[] getProjectIssueHeaders(long projectId) throws MCException; + + /** + * Get the issue headers that match the specified project id and paging + * details Constrain the number of issues to <code>limit</code>. + */ + public IIssueHeader[] getProjectIssueHeaders(long projectId, int limit) throws MCException; + + /** + * Get the issue headers that match the specified project id and paging + * details + */ + public IIssueHeader[] getProjectIssueHeaders(long projectId, int pageNumber, int perPage) + throws MCException; + + /** + * Get the attachments that belong to the specified project. + */ + public IProjectAttachment[] getProjectAttachments(long projectId) throws MCException; + + /** + * Get the data for the specified project attachment. + */ + public byte[] getProjectAttachment(long attachmentId) throws MCException; + + /** + * Submit a project attachment + */ + public long addProjectAttachment(long projectId, String name, String fileType, String title, + String description, byte[] content) throws MCException; + + /** + * Delete the project attachment with the specified id. + */ + public boolean deleteProjectAttachment(long attachmentId) throws MCException; + + /** + * Get appropriate users assigned to a project by access level. + */ + public IAccount[] getProjectUsers(long projectId, AccessLevel access) throws MCException; + + /** + * Get the value for the specified configuration variable. + */ + public String getConfigString(String configVar) throws MCException; + + /** + * Delete the note with the specified id. + */ + public boolean deleteNote(long noteId) throws MCException; + + /** + * Update issue. + */ + public boolean updateIssue(IIssue issue) throws MCException; + + /** + * Get the data for the specified issue attachment. + */ + public byte[] getIssueAttachment(long attachmentId) throws MCException; + + /** + * Submit an issue attachment + */ + public long addIssueAttachment(long issueId, String name, String fileType, byte[] content) + throws MCException; + + /** + * Delete the issue attachment with the specified id. + */ + public boolean deleteIssueAttachment(long attachmentId) throws MCException; + + /** + * Get the custom fields that belong to the specified project. + */ + public ICustomFieldDefinition[] getCustomFieldDefinitions(long projectId) throws MCException; + + /** + * Submit the specified version details. + */ + public long addVersion(IProjectVersion version) throws MCException; + + /** + * Update version method. + */ + public boolean updateVersion(IProjectVersion version) throws MCException; + + /** + * Delete the version with the specified id. + */ + public boolean deleteVersion(long id) throws MCException; + + /** + * Get the default priority for new issues. + */ + public IMCAttribute getDefaultIssuePriority() throws MCException; + + /** + * Get the default severity for new issues. + */ + public IMCAttribute getDefaultIssueSeverity() throws MCException; + + /** + * Get the default viewstate for new issues. + */ + public Viewstate getDefaultIssueViewState() throws MCException; + + /** + * Get the default viewstate for new notes. + */ + public Viewstate getDefaultNoteViewState() throws MCException; + + /** + * Submit a new realtionship. + */ + public long addRelationship(long issueId, IRelationship relationship) throws MCException; + + /** + * Delete the relationship for the specified issue. + */ + public boolean deleteRelationship(long issueId, long relationshipId) throws MCException; +} Added: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/MCException.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/MCException.java (rev 0) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/MCException.java 2007-03-24 11:06:28 UTC (rev 117) @@ -0,0 +1,33 @@ +/* + * Copyright 2005 Peter Lanser + * + * MantisConnect is copyrighted to Victor Boctor + * + * This program is distributed under the terms and conditions of the GPL + * See LICENSE file for details. + * + * For commercial applications to link with or modify MantisConnect, they + * require the purchase of a MantisConnect commercial license. + */ +package org.mantisbt.connect; + +/** + * @author Peter Lanser, pl...@us... + */ +public class MCException extends Exception { + + private static final long serialVersionUID = 4885948644508250778L; + + public MCException(String msg, Throwable t) { + super(msg, t); + } + + public MCException(String msg) { + super(msg); + } + + public MCException(Throwable t) { + super(t); + } + +} Added: mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/ant/taskdefs/MockSession.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/ant/taskdefs/MockSession.java (rev 0) +++ mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/ant/taskdefs/MockSession.java 2007-03-24 11:06:28 UTC (rev 117) @@ -0,0 +1,260 @@ +/* + * Copyright 2007 Peter Lanser + * + * MantisConnect is copyrighted to Victor Boctor + * + * This program is distributed under the terms and conditions of the GPL + * See LICENSE file for details. + * + * For commercial applications to link with or modify MantisConnect, they + * require the purchase of a MantisConnect commercial license. + */ +package org.mantisbt.connect.ant.taskdefs; + +import java.net.URL; + +import org.jmock.Mock; +import org.mantisbt.connect.AccessLevel; +import org.mantisbt.connect.Enumeration; +import org.mantisbt.connect.IMCSession; +import org.mantisbt.connect.MCException; +import org.mantisbt.connect.Viewstate; +import org.mantisbt.connect.model.IAccount; +import org.mantisbt.connect.model.ICustomFieldDefinition; +import org.mantisbt.connect.model.IFilter; +import org.mantisbt.connect.model.IIssue; +import org.mantisbt.connect.model.IIssueHeader; +import org.mantisbt.connect.model.IMCAttribute; +import org.mantisbt.connect.model.INote; +import org.mantisbt.connect.model.IProject; +import org.mantisbt.connect.model.IProjectAttachment; +import org.mantisbt.connect.model.IProjectVersion; +import org.mantisbt.connect.model.IRelationship; + +public class MockSession implements IMCSession { + + public static Mock mock; + + private IMCSession delegate; + + public MockSession(URL url, String user, String pwd, String proxyHost, int proxyPort) { + delegate = (IMCSession) mock.proxy(); + } + + public long addIssue(IIssue issue) throws MCException { + return delegate.addIssue(issue); + } + + public long addIssueAttachment(long issueId, String name, String fileType, byte[] content) throws MCException { + return delegate.addIssueAttachment(issueId, name, fileType, content); + } + + public long addNote(long issueId, INote note) throws MCException { + return delegate.addNote(issueId, note); + } + + public long addProject(IProject project) throws MCException { + return delegate.addProject(project); + } + + public long addProjectAttachment(long projectId, String name, String fileType, String title, String description, byte[] content) throws MCException { + return delegate.addProjectAttachment(projectId, name, fileType, title, description, content); + } + + public long addRelationship(long issueId, IRelationship relationship) throws MCException { + return delegate.addRelationship(issueId, relationship); + } + + public long addVersion(IProjectVersion version) throws MCException { + return delegate.addVersion(version); + } + + public boolean deleteIssue(long issueId) throws MCException { + return delegate.deleteIssue(issueId); + } + + public boolean deleteIssueAttachment(long attachmentId) throws MCException { + return delegate.deleteIssueAttachment(attachmentId); + } + + public boolean deleteNote(long noteId) throws MCException { + return delegate.deleteNote(noteId); + } + + public boolean deleteProject(long projectId) throws MCException { + return delegate.deleteProject(projectId); + } + + public boolean deleteProjectAttachment(long attachmentId) throws MCException { + return delegate.deleteProjectAttachment(attachmentId); + } + + public boolean deleteRelationship(long issueId, long relationshipId) throws MCException { + return delegate.deleteRelationship(issueId, relationshipId); + } + + public boolean deleteVersion(long id) throws MCException { + return delegate.deleteVersion(id); + } + + public void flush() { + delegate.flush(); + } + + public IProject[] getAccessibleProjects() throws MCException { + return delegate.getAccessibleProjects(); + } + + public long getBiggestIssueId(long projectId) throws MCException { + return delegate.getBiggestIssueId(projectId); + } + + public String[] getCategories(long projectId) throws MCException { + return delegate.getCategories(projectId); + } + + public String getConfigString(String configVar) throws MCException { + return delegate.getConfigString(configVar); + } + + public ICustomFieldDefinition[] getCustomFieldDefinitions(long projectId) throws MCException { + return delegate.getCustomFieldDefinitions(projectId); + } + + public IMCAttribute getDefaultIssuePriority() throws MCException { + return delegate.getDefaultIssuePriority(); + } + + public IMCAttribute getDefaultIssueSeverity() throws MCException { + return delegate.getDefaultIssueSeverity(); + } + + public Viewstate getDefaultIssueViewState() throws MCException { + return delegate.getDefaultIssueViewState(); + } + + public Viewstate getDefaultNoteViewState() throws MCException { + return delegate.getDefaultNoteViewState(); + } + + public IMCAttribute[] getEnum(Enumeration enumeration) throws MCException { + return delegate.getEnum(enumeration); + } + + public String getEnum(String enumeration) throws MCException { + return delegate.getEnum(enumeration); + } + + public IFilter[] getFilters(long projectId) throws MCException { + return delegate.getFilters(projectId); + } + + public long getIdFromSummary(String summary) throws MCException { + return delegate.getIdFromSummary(summary); + } + + public IIssue getIssue(long issueId) throws MCException { + return delegate.getIssue(issueId); + } + + public byte[] getIssueAttachment(long attachmentId) throws MCException { + return delegate.getIssueAttachment(attachmentId); + } + + public IIssueHeader[] getIssueHeaders(long projectId, long filterId, int pageNumber, int perPage) throws MCException { + return delegate.getIssueHeaders(projectId, filterId, pageNumber, perPage); + } + + public IIssueHeader[] getIssueHeaders(long projectId, long filterId, int limit) throws MCException { + return delegate.getIssueHeaders(projectId, filterId, limit); + } + + public IIssueHeader[] getIssueHeaders(long projectId, long filterId) throws MCException { + return delegate.getIssueHeaders(projectId, filterId); + } + + public IIssue[] getIssues(long projectId, long filterId, int pageNumber, int perPage) throws MCException { + return delegate.getIssues(projectId, filterId, pageNumber, perPage); + } + + public IIssue[] getIssues(long projectId, long filterId, int limit) throws MCException { + return delegate.getIssues(projectId, filterId, limit); + } + + public IIssue[] getIssues(long projectId, long filterId) throws MCException { + return delegate.getIssues(projectId, filterId); + } + + public byte[] getProjectAttachment(long attachmentId) throws MCException { + return delegate.getProjectAttachment(attachmentId); + } + + public IProjectAttachment[] getProjectAttachments(long projectId) throws MCException { + return delegate.getProjectAttachments(projectId); + } + + public IIssueHeader[] getProjectIssueHeaders(long projectId, int pageNumber, int perPage) throws MCException { + return delegate.getProjectIssueHeaders(projectId, pageNumber, perPage); + } + + public IIssueHeader[] getProjectIssueHeaders(long projectId, int limit) throws MCException { + return delegate.getProjectIssueHeaders(projectId, limit); + } + + public IIssueHeader[] getProjectIssueHeaders(long projectId) throws MCException { + return delegate.getProjectIssueHeaders(projectId); + } + + public IIssue[] getProjectIssues(long projectId, int pageNumber, int perPage) throws MCException { + return delegate.getProjectIssues(projectId, pageNumber, perPage); + } + + public IIssue[] getProjectIssues(long projectId, int limit) throws MCException { + return delegate.getProjectIssues(projectId, limit); + } + + public IIssue[] getProjectIssues(long projectId) throws MCException { + return delegate.getProjectIssues(projectId); + } + + public IAccount[] getProjectUsers(long projectId, AccessLevel access) throws MCException { + return delegate.getProjectUsers(projectId, access); + } + + public IProjectVersion[] getReleasedVersions(long projectId) throws MCException { + return delegate.getReleasedVersions(projectId); + } + + public IProjectVersion[] getUnreleasedVersions(long projectId) throws MCException { + return delegate.getUnreleasedVersions(projectId); + } + + public String getVersion() throws MCException { + return delegate.getVersion(); + } + + public IProjectVersion[] getVersions(long projectId) throws MCException { + return delegate.getVersions(projectId); + } + + public boolean issueExists(long issueId) throws MCException { + return delegate.issueExists(issueId); + } + + public IIssue newIssue(long projectId) throws MCException { + return delegate.newIssue(projectId); + } + + public INote newNote(String text) throws MCException { + return delegate.newNote(text); + } + + public boolean updateIssue(IIssue issue) throws MCException { + return delegate.updateIssue(issue); + } + + public boolean updateVersion(IProjectVersion version) throws MCException { + return delegate.updateVersion(version); + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-24 11:01:44
|
Revision: 115 http://svn.sourceforge.net/mantisconnect/?rev=115&view=rev Author: planser Date: 2007-03-24 04:01:41 -0700 (Sat, 24 Mar 2007) Log Message: ----------- Added Paths: ----------- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/axis/ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/model/ mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vb...@us...> - 2007-03-22 07:34:39
|
Revision: 113 http://svn.sourceforge.net/mantisconnect/?rev=113&view=rev Author: vboctor Date: 2007-03-22 00:34:36 -0700 (Thu, 22 Mar 2007) Log Message: ----------- Updated version to 1.1.0-SVN and fixed a copy-and-paste typo in WSDL. Modified Paths: -------------- mantisconnect/trunk/webservice/mc/mantisconnect.php mantisconnect/trunk/webservice/mc/mc_api.php Modified: mantisconnect/trunk/webservice/mc/mantisconnect.php =================================================================== --- mantisconnect/trunk/webservice/mc/mantisconnect.php 2007-03-05 16:14:51 UTC (rev 112) +++ mantisconnect/trunk/webservice/mc/mantisconnect.php 2007-03-22 07:34:36 UTC (rev 113) @@ -368,7 +368,7 @@ 'access_min' => array( 'name' => 'access_min', 'type' => 'tns:ObjectRef', 'minOccurs' => '0' ), 'file_path' => array( 'name' => 'file_path', 'type' => 'xsd:string', 'minOccurs' => '0' ), 'description' => array( 'name' => 'description', 'type' => 'xsd:string', 'minOccurs' => '0' ), - 'subprojects' => array( 'name' => 'description', 'type' => 'tns:ProjectDataArray', 'minOccurs' => '0' ) + 'subprojects' => array( 'name' => 'subprojects', 'type' => 'tns:ProjectDataArray', 'minOccurs' => '0' ) ) ); Modified: mantisconnect/trunk/webservice/mc/mc_api.php =================================================================== --- mantisconnect/trunk/webservice/mc/mc_api.php 2007-03-05 16:14:51 UTC (rev 112) +++ mantisconnect/trunk/webservice/mc/mc_api.php 2007-03-22 07:34:36 UTC (rev 113) @@ -24,7 +24,7 @@ */ function mc_version() { - return '0.0.5'; + return '1.1.0-SVN'; } # -------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-05 16:14:57
|
Revision: 112 http://svn.sourceforge.net/mantisconnect/?rev=112&view=rev Author: planser Date: 2007-03-05 08:14:51 -0800 (Mon, 05 Mar 2007) Log Message: ----------- Added support for subprojects Added Paths: ----------- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/lib/mantisconnect-client-api-0.0.6.jar Added: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/lib/mantisconnect-client-api-0.0.6.jar =================================================================== (Binary files differ) Property changes on: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/lib/mantisconnect-client-api-0.0.6.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-05 16:14:12
|
Revision: 111 http://svn.sourceforge.net/mantisconnect/?rev=111&view=rev Author: planser Date: 2007-03-05 08:14:05 -0800 (Mon, 05 Mar 2007) Log Message: ----------- Removed Paths: ------------- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/lib/mantisconnect-client-api-0.0.6.jar Deleted: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/lib/mantisconnect-client-api-0.0.6.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-05 16:10:44
|
Revision: 110 http://svn.sourceforge.net/mantisconnect/?rev=110&view=rev Author: planser Date: 2007-03-05 08:10:39 -0800 (Mon, 05 Mar 2007) Log Message: ----------- Added support for subprojects Modified Paths: -------------- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/ConnectionSettings.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/ConnectionSettingsRegistry.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/MantisConnectView.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/ProjectsLabelProvider.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/UpdateProjectsRunnable.java Added Paths: ----------- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/ProjectDataNode.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/ProjectsContentProvider.java Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/ConnectionSettings.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/ConnectionSettings.java 2007-03-05 16:05:19 UTC (rev 109) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/ConnectionSettings.java 2007-03-05 16:10:39 UTC (rev 110) @@ -74,7 +74,7 @@ private boolean savePassword; - private int lastProjectId; + private String lastProjectIdPath; private Map<Integer, Integer> filters = new HashMap<Integer, Integer>(); @@ -83,18 +83,18 @@ } public ConnectionSettings(String name, URL mantisConnectUrl) { - this(name, mantisConnectUrl, null, null, null, false, -1, new HashMap<Integer, Integer>()); + this(name, mantisConnectUrl, null, null, null, false, null, new HashMap<Integer, Integer>()); } public ConnectionSettings(String name, URL mantisConnectUrl, URL browserUrl, String user, - String password, boolean savePassword, int lastProjectId, Map<Integer, Integer> filters) { + String password, boolean savePassword, String lastProjectIdPath, Map<Integer, Integer> filters) { this.name = name; this.mantisConnectUrl = mantisConnectUrl; this.browserUrl = browserUrl; this.user = user; this.password = password; this.savePassword = savePassword; - this.lastProjectId = lastProjectId; + this.lastProjectIdPath = lastProjectIdPath; this.filters = filters; } @@ -118,8 +118,8 @@ return user; } - public int getLastProjectId() { - return lastProjectId; + public String getLastProjectIdPath() { + return lastProjectIdPath; } public int getLastFilterId(int projectId) { @@ -167,8 +167,8 @@ return savePassword; } - public void setLastProjectId(int lastProjectId) { - this.lastProjectId = lastProjectId; + public void setLastProjectIdPath(String lastProjectIdPath) { + this.lastProjectIdPath = lastProjectIdPath; } public void setLastFilterId(int projectId, int lastFilterId) { @@ -234,7 +234,7 @@ public Object clone() { return new ConnectionSettings(getName(), getMantisConnectUrl(), getBrowserUrl(), getUser(), - getPassword(), isSavePassword(), getLastProjectId(), getFilters()); + getPassword(), isSavePassword(), getLastProjectIdPath(), getFilters()); } public URL getUrlForIssue(IssueHeaderData issue, ProjectData project) { Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/ConnectionSettingsRegistry.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/ConnectionSettingsRegistry.java 2007-03-05 16:05:19 UTC (rev 109) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/ConnectionSettingsRegistry.java 2007-03-05 16:10:39 UTC (rev 110) @@ -39,25 +39,25 @@ private static final String TAG_NAME = "name"; private static final String TAG_MANTISCONNECT_URL = "url"; - + private static final String TAG_BROWSER_URL = "browser-url"; private static final String TAG_USER = "user"; private static final String TAG_PASSWORD = "password"; - + private static final String TAG_LAST_PROJECT_ID = "last-project-id"; - + private static final String TAG_PROJECT_FILTERS = "project-filters"; - + private static final String TAG_PROJECT_ID = "project-id"; - + private static final String TAG_FILTER_ID = "filter-id"; private static ConnectionSettingsRegistry instance; private Map<String, ConnectionSettings> map = new HashMap<String, ConnectionSettings>(); - + private ConnectionSettingsRegistry() { } @@ -75,7 +75,7 @@ String mantisUrl = connections[i].getString(TAG_BROWSER_URL); String user = connections[i].getString(TAG_USER); String password = connections[i].getString(TAG_PASSWORD); - Integer lastProjectId = connections[i].getInteger(TAG_LAST_PROJECT_ID); + String lastProjectId = connections[i].getString(TAG_LAST_PROJECT_ID); IMemento[] filters = connections[i].getChildren(TAG_PROJECT_FILTERS); Map<Integer, Integer> filterMap = new HashMap<Integer, Integer>(); for (int j = 0; j < filters.length; j++) { @@ -88,7 +88,7 @@ map.put(name, new ConnectionSettings(name, mantisConnectUrl, mantisUrl != null ? new URL(mantisUrl) : null, isEmpty(user) ? null : user, isEmpty(password) ? null : password, !isEmpty(password), - lastProjectId != null ? lastProjectId : -1, filterMap)); + isEmpty(lastProjectId) ? null : lastProjectId , filterMap)); } } @@ -109,7 +109,7 @@ memento.putString(TAG_BROWSER_URL, connection.getBrowserUrl().toString()); } memento.putString(TAG_USER, connection.getUser()); - memento.putInteger(TAG_LAST_PROJECT_ID, connection.getLastProjectId()); + memento.putString(TAG_LAST_PROJECT_ID, connection.getLastProjectIdPath()); if (connection.isSavePassword()) { memento.putString(TAG_PASSWORD, connection.getPassword()); } else { @@ -128,7 +128,7 @@ getPreferenceStore().setValue(MantisConnectPlugin.PREF_CONNECTIONS, sw.getBuffer().toString()); } - + public ConnectionSettings getConnection(String name) { ConnectionSettings result = (ConnectionSettings) map.get(name); if (result != null) { @@ -137,19 +137,20 @@ return null; } } - + public ConnectionSettings[] getConnections() { ConnectionSettings[] result = new ConnectionSettings[map.size()]; Iterator iterator = map.entrySet().iterator(); int pos = 0; while (iterator.hasNext()) { - ConnectionSettings connection = (ConnectionSettings) ((Map.Entry) iterator.next()).getValue(); + ConnectionSettings connection = (ConnectionSettings) ((Map.Entry) iterator.next()) + .getValue(); result[pos] = (ConnectionSettings) connection.clone(); pos += 1; } return result; } - + public void setConnections(ConnectionSettings[] connections) throws IOException { map.clear(); for (int i = 0; i < connections.length; i++) { Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/MantisConnectView.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/MantisConnectView.java 2007-03-05 16:05:19 UTC (rev 109) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/MantisConnectView.java 2007-03-05 16:10:39 UTC (rev 110) @@ -91,13 +91,13 @@ * @author Peter Lanser, pl...@us... */ public class MantisConnectView extends ViewPart implements IssueViewer { - + public static String ID = "org.mantisbt.connect.eclipse.views.MantisConnectView"; private static final String TAG_CURRENT_CONNECTION = "current-connection"; - + private static final String TAG_LAST_SORTED_COLUMN = "last-sorted-column"; - + private static final String TAG_LAST_SORTED_ASC = "last-sorted-asc"; private static final String TAG_VERTICAL_POSITION = "verticalPosition"; @@ -134,40 +134,40 @@ new ColumnWeightData(800), // Summary }; - private final static String[] COLUMN_HEADERS = { "", "", "ID", "#", - "Category", "Severity", "Status", "Updated", "Summary" }; + private final static String[] COLUMN_HEADERS = { "", "", "ID", "#", "Category", "Severity", + "Status", "Updated", "Summary" }; - private final static int[] COLUMN_STYLES = { SWT.NONE, SWT.NONE, SWT.RIGHT, - SWT.RIGHT, SWT.NONE, SWT.NONE, SWT.NONE, SWT.RIGHT, SWT.NONE }; + private final static int[] COLUMN_STYLES = { SWT.NONE, SWT.NONE, SWT.RIGHT, SWT.RIGHT, + SWT.NONE, SWT.NONE, SWT.NONE, SWT.RIGHT, SWT.NONE }; private IMemento memento; private ConnectionSettings currentConnection; - + private ContributionWrapper[] issueViewerContributions; private ColumnLayoutData[] columnLayouts; private IssuesSorter sorter; - + private TableViewer issues; - + private IssuesPatternFilter viewerFilter; private ComboViewer projects; private ComboViewer filters; - + private Text filterText; - + private ToolBarManager clearButtonToolbar; - + private Label sessionInfo; private ISession session; private RefreshIssuesJob refreshIssuesJob; - + private RefreshAction refreshAction; private NewIssueAction newIssueAction; @@ -178,58 +178,50 @@ super.init(site, memento); this.memento = memento; if (memento != null) { - currentConnection = ConnectionSettingsRegistry.getInstance() - .getConnection(memento.getString(TAG_CURRENT_CONNECTION)); + currentConnection = ConnectionSettingsRegistry.getInstance().getConnection( + memento.getString(TAG_CURRENT_CONNECTION)); } - MantisConnectPlugin.getDefault().getPreferenceStore() - .addPropertyChangeListener(new IPropertyChangeListener() { + MantisConnectPlugin.getDefault().getPreferenceStore().addPropertyChangeListener( + new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { - if (event - .getProperty() - .equals( - MantisConnectPlugin.PREF_REFRESH_INTERVAL_IN_MS)) { + if (event.getProperty().equals( + MantisConnectPlugin.PREF_REFRESH_INTERVAL_IN_MS)) { scheduleRefreshJob(getRefreshIntervallInMs()); - } else if (event.getProperty().equals( - MantisConnectPlugin.PREF_LIMIT)) { + } else if (event.getProperty().equals(MantisConnectPlugin.PREF_LIMIT)) { updateIssues(); - } else if (event.getProperty().equals( - MantisConnectPlugin.PREF_CHANGED)) { + } else if (event.getProperty().equals(MantisConnectPlugin.PREF_CHANGED)) { ((IssuesLabelProvider) issues.getLabelProvider()) .setChanged(getChanged()); issues.refresh(); - } else if (event.getProperty().equals( - MantisConnectPlugin.PREF_CONNECTIONS)) { + } else if (event.getProperty().equals(MantisConnectPlugin.PREF_CONNECTIONS)) { if (getCurrentConnectionSettings() != null) { - String currentName = getCurrentConnectionSettings() - .getName(); + String currentName = getCurrentConnectionSettings().getName(); ConnectionSettings settings = ConnectionSettingsRegistry - .getInstance().getConnection( - currentName); + .getInstance().getConnection(currentName); setCurrentConnectionSettings(settings, false); } } } }); - IConfigurationElement[] elements = Platform.getExtensionRegistry() - .getConfigurationElementsFor( - "org.mantisbt.connect.eclipse.issueViewerContribution"); + IConfigurationElement[] elements = Platform + .getExtensionRegistry() + .getConfigurationElementsFor("org.mantisbt.connect.eclipse.issueViewerContribution"); ArrayList<ContributionWrapper> contributions = new ArrayList<ContributionWrapper>(); for (int i = 0; i < elements.length; i++) { try { IIssueViewerContribution contribution = (IIssueViewerContribution) elements[i] .createExecutableExtension("class"); contribution.init(this); - int columns = Integer.parseInt(elements[i] - .getAttribute("columns")); - String pluginId = ((org.eclipse.core.runtime.IExtension) elements[i] - .getParent()).getUniqueIdentifier(); + int columns = Integer.parseInt(elements[i].getAttribute("columns")); + String pluginId = ((org.eclipse.core.runtime.IExtension) elements[i].getParent()) + .getUniqueIdentifier(); ContributionWrapper.Position position = ContributionWrapper.Position .fromString(elements[i].getAttribute("position")); - contributions.add(new ContributionWrapper( - contribution, pluginId, columns, position)); + contributions + .add(new ContributionWrapper(contribution, pluginId, columns, position)); } catch (CoreException e) { - MantisConnectPlugin.getDefault().error( - "Could not create IssueViewerContribution", e, true); + MantisConnectPlugin.getDefault().error("Could not create IssueViewerContribution", + e, true); } } issueViewerContributions = (ContributionWrapper[]) contributions @@ -261,8 +253,9 @@ ContributionWrapper[] end = getIssueViewerContributions(ContributionWrapper.Position.END); for (int i = 0; i < end.length; i++) { for (int j = 0; j < end[i].getColumnCount(); j++) { - memento.putInteger("column." + end[i].getId() + "." + j, columns[offset] - .getWidth()); + memento + .putInteger("column." + end[i].getId() + "." + j, columns[offset] + .getWidth()); offset += 1; } } @@ -297,7 +290,7 @@ topControls.setLayoutData(gd); new Label(topControls, SWT.NONE).setText("Project:"); projects = new ComboViewer(topControls, SWT.READ_ONLY); - projects.setContentProvider(new SimpleViewerContentProvider()); + projects.setContentProvider(new ProjectsContentProvider()); projects.setLabelProvider(new ProjectsLabelProvider()); projects.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { @@ -385,7 +378,7 @@ setCurrentConnectionSettings(currentConnection, false); scheduleRefreshJob(getRefreshIntervallInMs()); } - + private String getInitialFilterText() { return "type filter text"; } @@ -393,57 +386,56 @@ private Text createFilterText(Composite topControls) { filterText = new Text(topControls, SWT.BORDER); filterText.setText(getInitialFilterText()); - filterText.addFocusListener( - new FocusAdapter(){ - public void focusGained(FocusEvent e) { - /* Running in an asyncExec because the selectAll() does not - * appear to work when using mouse to give focus to text. - */ - Display display = filterText.getDisplay(); - display.asyncExec(new Runnable() { - public void run() { - if (!filterText.isDisposed()){ - if (getInitialFilterText().equals(filterText.getText().trim())){ - filterText.selectAll(); - } - } - } - }); + filterText.addFocusListener(new FocusAdapter() { + public void focusGained(FocusEvent e) { + /* Running in an asyncExec because the selectAll() does not + * appear to work when using mouse to give focus to text. + */ + Display display = filterText.getDisplay(); + display.asyncExec(new Runnable() { + public void run() { + if (!filterText.isDisposed()) { + if (getInitialFilterText().equals(filterText.getText().trim())) { + filterText.selectAll(); + } + } } }); - filterText.addKeyListener(new KeyAdapter() { - public void keyPressed(KeyEvent e) { - // on a CR we want to transfer focus to the list - boolean hasItems = issues.getTable().getItemCount() > 0; - if(hasItems && e.keyCode == SWT.ARROW_DOWN){ - issues.getTable().setFocus(); - } else if (e.character == SWT.CR){ + } + }); + filterText.addKeyListener(new KeyAdapter() { + public void keyPressed(KeyEvent e) { + // on a CR we want to transfer focus to the list + boolean hasItems = issues.getTable().getItemCount() > 0; + if (hasItems && e.keyCode == SWT.ARROW_DOWN) { + issues.getTable().setFocus(); + } else if (e.character == SWT.CR) { return; - } - } - }); - filterText.addModifyListener(new ModifyListener(){ - public void modifyText(ModifyEvent e) { - filterTextChanged(); - } - }); + } + } + }); + filterText.addModifyListener(new ModifyListener() { + public void modifyText(ModifyEvent e) { + filterTextChanged(); + } + }); return filterText; } - + private void filterTextChanged() { String text = filterText.getText().trim(); viewerFilter.setPattern(text); issues.refresh(); updateClearButton(text.length() > 0); } - - private void createClearButton(Composite parent) { - ToolBar toolBar = new ToolBar(parent, SWT.FLAT | SWT.HORIZONTAL); + + private void createClearButton(Composite parent) { + ToolBar toolBar = new ToolBar(parent, SWT.FLAT | SWT.HORIZONTAL); clearButtonToolbar = new ToolBarManager(toolBar); IAction clearTextAction = new Action("", IAction.AS_PUSH_BUTTON) {//$NON-NLS-1$ public void run() { - filterText.setText(""); //$NON-NLS-1$ - filterTextChanged(); + filterText.setText(""); //$NON-NLS-1$ + filterTextChanged(); } }; clearTextAction.setToolTipText("Clear"); @@ -451,12 +443,12 @@ .getDescriptor(MantisConnectPlugin.IMG_CLEAR_16)); clearButtonToolbar.add(clearTextAction); clearButtonToolbar.update(false); - } - - private void updateClearButton(boolean visible) { - clearButtonToolbar.getControl().setVisible(visible); - } - + } + + private void updateClearButton(boolean visible) { + clearButtonToolbar.getControl().setVisible(visible); + } + private void hookContextMenu() { MenuManager menuMgr = new MenuManager("#PopupMenu"); menuMgr.setRemoveAllWhenShown(true); @@ -469,7 +461,7 @@ issues.getControl().setMenu(menu); getSite().registerContextMenu(menuMgr, issues); } - + private void fillContextMenu(IMenuManager manager) { // Other plug-ins can contribute there actions here manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); @@ -485,10 +477,8 @@ refreshIssuesJob.addJobChangeListener(new JobChangeAdapter() { public void done(IJobChangeEvent event) { if (event.getResult() != Status.CANCEL_STATUS) { - IssueHeaderData[] data = ((RefreshIssuesJob) event - .getJob()).getData(); - updateViewer(new UpdateIssuesRunnable(data, issues, - MantisConnectView.this)); + IssueHeaderData[] data = ((RefreshIssuesJob) event.getJob()).getData(); + updateViewer(new UpdateIssuesRunnable(data, issues, MantisConnectView.this)); } } }); @@ -500,17 +490,14 @@ FilterData filter = getCurrentFilter(); issues.getTable().clearAll(); if (filter != null) { - FetchIssuesJob job = new FetchIssuesJob(session, - getCurrentProject().getId().longValue(), filter.getId() - .longValue(), getLimit()); + FetchIssuesJob job = new FetchIssuesJob(session, getCurrentProject().getId() + .longValue(), filter.getId().longValue(), getLimit()); job.setUser(false); job.addJobChangeListener(new JobChangeAdapter() { public void done(IJobChangeEvent event) { if (event.getResult().isOK()) { - IssueHeaderData[] data = ((FetchIssuesJob) event.getJob()) - .getData(); - updateViewer(new UpdateIssuesRunnable(data, issues, - MantisConnectView.this)); + IssueHeaderData[] data = ((FetchIssuesJob) event.getJob()).getData(); + updateViewer(new UpdateIssuesRunnable(data, issues, MantisConnectView.this)); } else { clearUI(); } @@ -593,7 +580,7 @@ } }; } - + private IssuesSorter restoreSorter(IMemento memento) { IssuesSorter sorter = new IssuesSorter(this, getColumnIndex("column." + MantisConnectPlugin.getDefault().getBundle().getSymbolicName() + "." @@ -613,7 +600,7 @@ } return sorter; } - + private String getColumnId(int idx) { ContributionWrapper[] start = getIssueViewerContributions(ContributionWrapper.Position.START); int offset = 0; @@ -625,7 +612,8 @@ } } if (idx < offset + DEFAULT_COLUMN_LAYOUTS.length) { - return "column." + MantisConnectPlugin.getDefault().getBundle().getSymbolicName() + "." + (idx - offset); + return "column." + MantisConnectPlugin.getDefault().getBundle().getSymbolicName() + "." + + (idx - offset); } offset += DEFAULT_COLUMN_LAYOUTS.length; ContributionWrapper[] end = getIssueViewerContributions(ContributionWrapper.Position.END); @@ -636,10 +624,10 @@ offset += end[i].getColumnCount(); } } - + return null; } - + private int getColumnIndex(String columnId) { ContributionWrapper[] start = getIssueViewerContributions(ContributionWrapper.Position.START); int firstSep = columnId.indexOf('.'); @@ -673,22 +661,20 @@ } } else { offset += end[i].getColumnCount(); - } + } } } return -1; } - - private ContributionWrapper[] getIssueViewerContributions( - ContributionWrapper.Position position) { + + private ContributionWrapper[] getIssueViewerContributions(ContributionWrapper.Position position) { ArrayList<ContributionWrapper> result = new ArrayList<ContributionWrapper>(); for (int i = 0; i < issueViewerContributions.length; i++) { if (issueViewerContributions[i].getPosition().equals(position)) { result.add(issueViewerContributions[i]); } } - return (ContributionWrapper[]) result - .toArray(new ContributionWrapper[result.size()]); + return (ContributionWrapper[]) result.toArray(new ContributionWrapper[result.size()]); } private void restoreColumnWidths(IMemento memento) { @@ -712,16 +698,14 @@ getIssueViewerContributions(ContributionWrapper.Position.END), temp, memento); columnLayouts = (ColumnLayoutData[]) temp.toArray(new ColumnLayoutData[temp.size()]); } - - private void restoreIssueViewerContributorColumnWidths( - ContributionWrapper[] contributions, ArrayList<ColumnLayoutData> list, - IMemento memento) { + + private void restoreIssueViewerContributorColumnWidths(ContributionWrapper[] contributions, + ArrayList<ColumnLayoutData> list, IMemento memento) { for (int i = 0; i < contributions.length; i++) { for (int j = 0; j < contributions[i].getColumnCount(); j++) { Integer width = null; if (memento != null) { - width = memento - .getInteger("column." + contributions[i].getId() + "." + j); + width = memento.getInteger("column." + contributions[i].getId() + "." + j); } if (width != null) { list.add(new ColumnPixelData(width, true)); @@ -750,13 +734,13 @@ public FilterData getCurrentFilter() { IStructuredSelection selection = (IStructuredSelection) filters.getSelection(); - if (! selection.isEmpty()) { + if (!selection.isEmpty()) { return (FilterData) selection.getFirstElement(); } else { return null; } } - + public void sessionChanged(final boolean showError) { newIssueAction.setEnabled(session != null); refreshAction.setEnabled(session != null); @@ -767,8 +751,8 @@ public void done(IJobChangeEvent event) { if (event.getResult().isOK()) { ProjectData[] result = fetchProjectsJob.getData(); - ProjectData selection = findProjectById(result, - getCurrentConnectionSettings().getLastProjectId()); + ProjectDataNode selection = ProjectDataNode.createByPath(result, + getCurrentConnectionSettings().getLastProjectIdPath()); updateViewer(new UpdateProjectsRunnable(result, selection, projects, MantisConnectView.this)); } else { @@ -789,15 +773,6 @@ } sessionInfo.getParent().layout(true); } - - private ProjectData findProjectById(ProjectData[] projects, int projectId) { - for (ProjectData project : projects) { - if (project.getId().intValue() == projectId) { - return project; - } - } - return null; - } public void filterChanged() { getCurrentConnectionSettings().setLastFilterId(getCurrentProject().getId().intValue(), @@ -811,15 +786,16 @@ } public void projectChanged() { - final ProjectData project = getCurrentProject(); - if (project != null) { - getCurrentConnectionSettings().setLastProjectId(project.getId().intValue()); + final ProjectDataNode projectNode = getCurrentProjectNode(); + if (projectNode != null) { + getCurrentConnectionSettings().setLastProjectIdPath(projectNode.getIdPath()); try { ConnectionSettingsRegistry.getInstance().update(getCurrentConnectionSettings()); } catch (IOException e) { // eat } - FetchFiltersJob job = new FetchFiltersJob(session, project.getId().longValue()); + FetchFiltersJob job = new FetchFiltersJob(session, projectNode.getProjectData().getId() + .longValue()); job.setUser(false); job.addJobChangeListener(new JobChangeAdapter() { public void done(IJobChangeEvent event) { @@ -827,7 +803,7 @@ FilterData[] result = ((FetchFiltersJob) event.getJob()).getData(); FilterData selection = findFilterById(result, getCurrentConnectionSettings().getLastFilterId( - project.getId().intValue())); + projectNode.getProjectData().getId().intValue())); updateViewer(new UpdateFiltersRunnable(result, selection, filters, MantisConnectView.this)); } else { @@ -838,7 +814,7 @@ getProgressService().schedule(job); } } - + private FilterData findFilterById(FilterData[] filters, int filterId) { for (FilterData filter : filters) { if (filter.getId().intValue() == filterId) { @@ -847,16 +823,25 @@ } return null; } - - public ProjectData getCurrentProject() { + + public ProjectDataNode getCurrentProjectNode() { IStructuredSelection selection = (IStructuredSelection) projects.getSelection(); - if (! selection.isEmpty()) { - return (ProjectData) selection.getFirstElement(); + if (!selection.isEmpty()) { + return ((ProjectDataNode) selection.getFirstElement()); } else { return null; } } + public ProjectData getCurrentProject() { + ProjectDataNode projectDataNode = getCurrentProjectNode(); + if (projectDataNode != null) { + return projectDataNode.getProjectData(); + } else { + return null; + } + } + private void contributeToActionBars() { IActionBars bars = getViewSite().getActionBars(); fillLocalPullDown(bars.getMenuManager()); @@ -890,8 +875,7 @@ return currentConnection; } - public void setCurrentConnectionSettings(ConnectionSettings connection, - boolean explicit) { + public void setCurrentConnectionSettings(ConnectionSettings connection, boolean explicit) { currentConnection = connection; if (currentConnection != null && !connection.isComplete()) { if (explicit) { @@ -913,12 +897,11 @@ connection.setPassword(""); } try { - session = MantisConnectPlugin.getDefault().getSessionFactory() - .newSession(connection.getMantisConnectUrl(), connection.getUser(), - connection.getPassword()); + session = MantisConnectPlugin.getDefault().getSessionFactory().newSession( + connection.getMantisConnectUrl(), connection.getUser(), + connection.getPassword()); } catch (Exception e) { - MantisConnectPlugin.getDefault().error( - "Could not open session.", e, showError); + MantisConnectPlugin.getDefault().error("Could not open session.", e, showError); } } sessionChanged(showError); @@ -928,7 +911,7 @@ return (IWorkbenchSiteProgressService) getViewSite().getAdapter( IWorkbenchSiteProgressService.class); } - + public ISession getSession() { return session; } @@ -961,9 +944,9 @@ } }); } - + public IssueHeaderData[] getCurrentIssues() { return (IssueHeaderData[]) issues.getInput(); } - + } \ No newline at end of file Added: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/ProjectDataNode.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/ProjectDataNode.java (rev 0) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/ProjectDataNode.java 2007-03-05 16:10:39 UTC (rev 110) @@ -0,0 +1,91 @@ +package org.mantisbt.connect.eclipse.views; + +import java.util.StringTokenizer; + +import org.mantisbt.connect.service.ProjectData; + +public class ProjectDataNode { + + private ProjectData projectData; + + private ProjectDataNode parent; + + public ProjectDataNode(ProjectData projectData) { + this(projectData, null); + } + + public ProjectDataNode(ProjectData projectData, ProjectDataNode parent) { + this.projectData = projectData; + this.parent = parent; + } + + public int getLevel() { + if (parent != null) { + return parent.getLevel() + 1; + } else { + return 0; + } + } + + public ProjectData getProjectData() { + return projectData; + } + + public String toString() { + return new StringBuffer("Project: ").append(projectData.getName()).append(", Level: ") + .append(getLevel()).append(", IdPath: ").append(getIdPath()).toString(); + } + + public String getIdPath() { + StringBuffer buffer = new StringBuffer(); + if (parent != null) { + buffer.append(parent.getIdPath()).append("."); + } + return buffer.append(projectData.getId()).toString(); + } + + public int hashCode() { + return getIdPath().hashCode(); + } + + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + final ProjectDataNode other = (ProjectDataNode) obj; + return getIdPath().equals(other.getIdPath()); + } + + public static ProjectDataNode createByPath(ProjectData[] initialProjects, String path) { + ProjectData[] projects = initialProjects; + if (path != null) { + StringTokenizer tokenizer = new StringTokenizer(path, "."); + ProjectDataNode parent = null; + while (tokenizer.hasMoreElements()) { + int id = Integer.parseInt(tokenizer.nextToken()); + ProjectData project = findProjectById(projects, id); + if (project != null) { + parent = new ProjectDataNode(project, parent); + projects = project.getSubprojects(); + } + } + + return parent; + } else { + return null; + } + } + + private static ProjectData findProjectById(ProjectData[] projects, int projectId) { + for (ProjectData project : projects) { + if (project.getId().intValue() == projectId) { + return project; + } + } + return null; + } + +} Added: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/ProjectsContentProvider.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/ProjectsContentProvider.java (rev 0) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/ProjectsContentProvider.java 2007-03-05 16:10:39 UTC (rev 110) @@ -0,0 +1,47 @@ +package org.mantisbt.connect.eclipse.views; + +import java.util.ArrayList; +import java.util.Collections; + +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.Viewer; +import org.mantisbt.connect.service.ProjectData; + +public class ProjectsContentProvider implements IStructuredContentProvider { + + private ProjectDataNode[] projects; + + public Object[] getElements(Object inputElement) { + return projects; + } + + public void dispose() { + } + + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + if (newInput != null) { + ProjectData[] data = (ProjectData[]) newInput; + ArrayList<ProjectDataNode> elements = new ArrayList<ProjectDataNode>(); + for (int i = 0; i < data.length; i++) { + ProjectDataNode node = new ProjectDataNode(data[i]); + elements.add(node); + Collections.addAll(elements, findSubProjects(node)); + } + projects = (ProjectDataNode[]) elements.toArray(new ProjectDataNode[elements.size()]); + } else { + projects = new ProjectDataNode[0]; + } + } + + private ProjectDataNode[] findSubProjects(ProjectDataNode parent) { + ArrayList<ProjectDataNode> result = new ArrayList<ProjectDataNode>(); + ProjectData[] subProjects = parent.getProjectData().getSubprojects(); + for (int i = 0; i < subProjects.length; i++) { + ProjectDataNode node = new ProjectDataNode(subProjects[i], parent); + result.add(node); + Collections.addAll(result, findSubProjects(node)); + } + return (ProjectDataNode[]) result.toArray(new ProjectDataNode[result.size()]); + } + +} Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/ProjectsLabelProvider.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/ProjectsLabelProvider.java 2007-03-05 16:05:19 UTC (rev 109) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/ProjectsLabelProvider.java 2007-03-05 16:10:39 UTC (rev 110) @@ -12,7 +12,6 @@ package org.mantisbt.connect.eclipse.views; import org.eclipse.jface.viewers.LabelProvider; -import org.mantisbt.connect.service.ProjectData; /** * @author Peter Lanser, pl...@us... @@ -20,7 +19,20 @@ public class ProjectsLabelProvider extends LabelProvider { public String getText(Object element) { - return ((ProjectData) element).getName(); + ProjectDataNode data = (ProjectDataNode) element; + return new StringBuffer(getPrefix(data)).append(data.getProjectData().getName()).toString(); } + private String getPrefix(ProjectDataNode data) { + if (data.getLevel() == 0) { + return ""; + } else { + StringBuffer buffer = new StringBuffer(); + for (int i = 0; i < data.getLevel(); i++) { + buffer.append("-"); + } + return buffer.append(" ").toString(); + } + } + } Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/UpdateProjectsRunnable.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/UpdateProjectsRunnable.java 2007-03-05 16:05:19 UTC (rev 109) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/UpdateProjectsRunnable.java 2007-03-05 16:10:39 UTC (rev 110) @@ -21,10 +21,10 @@ */ public class UpdateProjectsRunnable extends UpdateViewerRunnable<ProjectData, ComboViewer> { - private ProjectData selectedObject; + private ProjectDataNode selectedObject; - public UpdateProjectsRunnable(ProjectData[] data, ProjectData selection, ComboViewer viewer, - MantisConnectView mantisView) { + public UpdateProjectsRunnable(ProjectData[] data, ProjectDataNode selection, + ComboViewer viewer, MantisConnectView mantisView) { super(data, viewer, mantisView); this.selectedObject = selection; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-05 16:05:30
|
Revision: 109 http://svn.sourceforge.net/mantisconnect/?rev=109&view=rev Author: planser Date: 2007-03-05 08:05:19 -0800 (Mon, 05 Mar 2007) Log Message: ----------- - Added support for subprojects - Introduced JMock Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/.classpath mantisconnect/trunk/clients/java/client-api/.settings/org.eclipse.jdt.core.prefs mantisconnect/trunk/clients/java/client-api/build.properties.sample Modified: mantisconnect/trunk/clients/java/client-api/.classpath =================================================================== --- mantisconnect/trunk/clients/java/client-api/.classpath 2007-03-05 16:04:12 UTC (rev 108) +++ mantisconnect/trunk/clients/java/client-api/.classpath 2007-03-05 16:05:19 UTC (rev 109) @@ -5,7 +5,7 @@ <classpathentry kind="src" path="src/test"/> <classpathentry kind="lib" path="lib/junit.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry sourcepath="C:/ToolsNLibs/axis-1_4/src" kind="lib" path="lib/axis.jar"/> + <classpathentry kind="lib" path="lib/axis.jar" sourcepath="C:/ToolsNLibs/axis-1_4/src"/> <classpathentry kind="lib" path="lib/axis-ant.jar"/> <classpathentry kind="lib" path="lib/commons-discovery-0.2.jar"/> <classpathentry kind="lib" path="lib/commons-logging-1.0.4.jar"/> @@ -14,8 +14,13 @@ <classpathentry kind="lib" path="lib/saaj.jar"/> <classpathentry kind="lib" path="lib/wsdl4j-1.5.1.jar"/> <classpathentry kind="lib" path="lib/activation.jar"/> - <classpathentry kind="lib" path="lib/ant.jar"/> + <classpathentry kind="lib" path="lib/ant.jar" sourcepath="C:/ToolsNLibs/apache-ant-1.6.5/src/main"/> <classpathentry kind="lib" path="lib/ant-launcher.jar"/> - <classpathentry kind="lib" path="lib/ant-testutil.jar"/> + <classpathentry kind="lib" path="lib/ant-testutil.jar" sourcepath="C:/ToolsNLibs/apache-ant-1.6.5/src/testcases"/> + <classpathentry kind="lib" path="lib/jmock-1.1.0.jar" sourcepath="C:/ToolsNLibs/jmock-1.1.0/core/src"> + <attributes> + <attribute name="javadoc_location" value="file:/C:/ToolsNLibs/jmock-1.1.0/javadoc-1.1.0/"/> + </attributes> + </classpathentry> <classpathentry kind="output" path="classes"/> </classpath> Modified: mantisconnect/trunk/clients/java/client-api/.settings/org.eclipse.jdt.core.prefs =================================================================== --- mantisconnect/trunk/clients/java/client-api/.settings/org.eclipse.jdt.core.prefs 2007-03-05 16:04:12 UTC (rev 108) +++ mantisconnect/trunk/clients/java/client-api/.settings/org.eclipse.jdt.core.prefs 2007-03-05 16:05:19 UTC (rev 109) @@ -1,12 +1,12 @@ -#Thu Aug 10 19:21:20 CEST 2006 +#Sun Nov 12 17:59:44 CET 2006 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.4 +org.eclipse.jdt.core.compiler.compliance=1.3 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning -org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore +org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore org.eclipse.jdt.core.compiler.source=1.3 Modified: mantisconnect/trunk/clients/java/client-api/build.properties.sample =================================================================== --- mantisconnect/trunk/clients/java/client-api/build.properties.sample 2007-03-05 16:04:12 UTC (rev 108) +++ mantisconnect/trunk/clients/java/client-api/build.properties.sample 2007-03-05 16:05:19 UTC (rev 109) @@ -27,8 +27,7 @@ test.project.customfields = ADateField;AStringField # Name of the custom field we want to submit with test issues test.project.customfield.name = ADateField -# Value of the custom field we want to submit +# Value of the custom field we want to submit - must be a date test.project.customfield.value = 02.05.1978 -# Format of the custom field we want to submit -# (only needed if the custom field is a date field - leave empty otherwise) +# Format of the custom field we want to submit (date) test.project.customfield.format = dd.MM.yy \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-05 16:04:24
|
Revision: 108 http://svn.sourceforge.net/mantisconnect/?rev=108&view=rev Author: planser Date: 2007-03-05 08:04:12 -0800 (Mon, 05 Mar 2007) Log Message: ----------- - Added support for subprojects - Introduced JMock Added Paths: ----------- mantisconnect/trunk/clients/java/client-api/lib/jmock-1.1.0.jar Added: mantisconnect/trunk/clients/java/client-api/lib/jmock-1.1.0.jar =================================================================== (Binary files differ) Property changes on: mantisconnect/trunk/clients/java/client-api/lib/jmock-1.1.0.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-03-05 15:58:24
|
Revision: 106 http://svn.sourceforge.net/mantisconnect/?rev=106&view=rev Author: planser Date: 2007-03-05 07:58:14 -0800 (Mon, 05 Mar 2007) Log Message: ----------- Fixed #0000308: Support subprojects Modified Paths: -------------- mantisconnect/trunk/webservice/mc/mantisconnect.php mantisconnect/trunk/webservice/mc/mc_api.php mantisconnect/trunk/webservice/mc/mc_issue_api.php mantisconnect/trunk/webservice/mc/mc_project_api.php Modified: mantisconnect/trunk/webservice/mc/mantisconnect.php =================================================================== --- mantisconnect/trunk/webservice/mc/mantisconnect.php 2007-01-17 18:38:51 UTC (rev 105) +++ mantisconnect/trunk/webservice/mc/mantisconnect.php 2007-03-05 15:58:14 UTC (rev 106) @@ -367,7 +367,8 @@ 'view_state' => array( 'name' => 'view_state', 'type' => 'tns:ObjectRef', 'minOccurs' => '0' ), 'access_min' => array( 'name' => 'access_min', 'type' => 'tns:ObjectRef', 'minOccurs' => '0' ), 'file_path' => array( 'name' => 'file_path', 'type' => 'xsd:string', 'minOccurs' => '0' ), - 'description' => array( 'name' => 'description', 'type' => 'xsd:string', 'minOccurs' => '0' ) + 'description' => array( 'name' => 'description', 'type' => 'xsd:string', 'minOccurs' => '0' ), + 'subprojects' => array( 'name' => 'description', 'type' => 'tns:ProjectDataArray', 'minOccurs' => '0' ) ) ); Modified: mantisconnect/trunk/webservice/mc/mc_api.php =================================================================== --- mantisconnect/trunk/webservice/mc/mc_api.php 2007-01-17 18:38:51 UTC (rev 105) +++ mantisconnect/trunk/webservice/mc/mc_api.php 2007-03-05 15:58:14 UTC (rev 106) @@ -219,5 +219,57 @@ } return '@' . $p_val . '@'; } + + function mci_user_get_accessible_subprojects( $p_user_id, $p_parent_project_id ) { + $t_result = array(); + foreach( user_get_accessible_subprojects( $t_user_id, $p_parent_project_id ) as $t_subproject_id ) { + $t_subproject_row = project_cache_row( $t_subproject_id ); + $t_subproject = array(); + $t_subproject['id'] = $t_subproject_id; + $t_subproject['name'] = $t_subproject_row['name']; + $t_subproject['status'] = mci_enum_get_array_by_id( $t_subproject_row['status'], 'project_status', $t_lang ); + $t_subproject['enabled'] = $t_subproject_row['enabled']; + $t_subproject['view_state'] = mci_enum_get_array_by_id( $t_subproject_row['view_state'], 'project_view_state', $t_lang ); + $t_subproject['access_min'] = mci_enum_get_array_by_id( $t_subproject_row['access_min'], 'access_levels', $t_lang ); + $t_subproject['file_path'] = + array_key_exists( 'file_path', $t_subproject_row ) ? $t_subproject_row['file_path'] : ""; + $t_subproject['description'] = + array_key_exists( 'description', $t_subproject_row ) ? $t_subproject_row['description'] : ""; + $t_subproject['subprojects'] = mci_user_get_accessible_subprojects( $p_user_id, $t_subproject_id ); + $t_result[] = $t_subproject; + } + return $t_result; + } + + # -------------------- + # category_get_all_rows did't respect subprojects. + function mci_category_get_all_rows( $p_project_id, $p_user_id ) { + $t_mantis_project_category_table = config_get( 'mantis_project_category_table' ); + + $c_project_id = db_prepare_int( $p_project_id ); + + $t_project_where = helper_project_specific_where( $c_project_id, $p_user_id ); + + # grab all categories in the project category table + $cat_arr = array(); + $query = "SELECT DISTINCT category + FROM $t_mantis_project_category_table + WHERE $t_project_where + ORDER BY category"; + $result = db_query( $query ); + $category_count = db_num_rows( $result ); + for ($i=0;$i<$category_count;$i++) { + $row = db_fetch_array( $result ); + $cat_arr[] = string_attribute( $row['category'] ); + } + sort( $cat_arr ); + $cat_arr = array_unique( $cat_arr ); + + $rows = array(); + foreach( $cat_arr as $t_category ) { + $rows[] = $t_category; + } + return $rows; + } ?> \ No newline at end of file Modified: mantisconnect/trunk/webservice/mc/mc_issue_api.php =================================================================== --- mantisconnect/trunk/webservice/mc/mc_issue_api.php 2007-01-17 18:38:51 UTC (rev 105) +++ mantisconnect/trunk/webservice/mc/mc_issue_api.php 2007-03-05 15:58:14 UTC (rev 106) @@ -439,7 +439,7 @@ return new soap_fault( 'Client', '', "User '$t_handler_id' does not exist." ); } - if ( !category_exists( $t_project_id, $v_category ) ) { + if ( !in_array( $v_category, mci_category_get_all_rows( $t_project_id, $t_user_id ) ) ) { $t_error_when_category_not_found = config_get( 'mc_error_when_category_not_found' ); if ( $t_error_when_category_not_found == ON ) { if ( is_blank( $v_category ) && ( count( category_get_all_rows( $t_project_id ) ) == 0 ) ) { @@ -602,7 +602,7 @@ return new soap_fault( 'Client', '', "User '$t_handler_id' does not exist." ); } - if ( !category_exists( $t_project_id, $v_category ) ) { + if ( !in_array( $v_category, mci_category_get_all_rows( $t_project_id, $t_user_id ) ) ) { $t_error_when_category_not_found = config_get( 'mc_error_when_category_not_found' ); if ( $t_error_when_category_not_found == ON ) { if ( is_blank( $v_category ) && ( count( category_get_all_rows( $t_project_id ) ) == 0 ) ) { Modified: mantisconnect/trunk/webservice/mc/mc_project_api.php =================================================================== --- mantisconnect/trunk/webservice/mc/mc_project_api.php 2007-01-17 18:38:51 UTC (rev 105) +++ mantisconnect/trunk/webservice/mc/mc_project_api.php 2007-03-05 15:58:14 UTC (rev 106) @@ -112,6 +112,7 @@ array_key_exists( 'file_path', $t_project_row ) ? $t_project_row['file_path'] : ""; $t_project['description'] = array_key_exists( 'description', $t_project_row ) ? $t_project_row['description'] : ""; + $t_project['subprojects'] = mci_user_get_accessible_subprojects( $t_user_id, $t_project_id ); $t_result[] = $t_project; } return $t_result; @@ -139,13 +140,8 @@ if ( !mci_has_readonly_access( $t_user_id, $p_project_id ) ) { return new soap_fault( 'Client', '', 'Access Denied' ); } - - $t_result = array(); - foreach( category_get_all_rows( $p_project_id ) as $t_category) { - $t_result[] = $t_category['category']; - } - - return $t_result; + + return mci_category_get_all_rows( $p_project_id, $t_user_id ); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-01-17 18:38:52
|
Revision: 105 http://svn.sourceforge.net/mantisconnect/?rev=105&view=rev Author: planser Date: 2007-01-17 10:38:51 -0800 (Wed, 17 Jan 2007) Log Message: ----------- Added utility method toObjectRef() Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/RelationshipType.java Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/RelationshipType.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/RelationshipType.java 2007-01-17 18:20:33 UTC (rev 104) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/RelationshipType.java 2007-01-17 18:38:51 UTC (rev 105) @@ -12,7 +12,10 @@ package org.mantisbt.connect; import java.io.Serializable; +import java.math.BigInteger; +import org.mantisbt.connect.service.ObjectRef; + /** * @author Peter Lanser, pl...@us... */ @@ -57,6 +60,10 @@ } } + public ObjectRef toObjectRef() { + return new ObjectRef(BigInteger.valueOf(getCode()), null); + } + public int hashCode() { final int PRIME = 31; int result = super.hashCode(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-01-17 18:37:53
|
Revision: 101 http://svn.sourceforge.net/mantisconnect/?rev=101&view=rev Author: planser Date: 2007-01-17 10:18:51 -0800 (Wed, 17 Jan 2007) Log Message: ----------- Fixed #289 and #294 (support for relationships) Modified Paths: -------------- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/dialogs/IssueDialog.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/AttachmentsSection.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/GeneralPage.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/MainAttributesSection.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NewNoteSection.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NotesPage.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NotesPart.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/RelationshipsSection.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/IssuesLabelProvider.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/MantisConnectView.java Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/dialogs/IssueDialog.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/dialogs/IssueDialog.java 2007-01-17 18:14:32 UTC (rev 100) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/dialogs/IssueDialog.java 2007-01-17 18:18:51 UTC (rev 101) @@ -41,6 +41,7 @@ import org.mantisbt.connect.Enumeration; import org.mantisbt.connect.ISession; import org.mantisbt.connect.JMTException; +import org.mantisbt.connect.Viewstate; import org.mantisbt.connect.eclipse.CustomFieldType; import org.mantisbt.connect.eclipse.MantisConnectPlugin; import org.mantisbt.connect.eclipse.StatusInfo; @@ -312,12 +313,15 @@ } if (issue.getView_state() != null) { privateIssueButton - .setSelection(issue.getView_state().getId().intValue() == ISession.VS_PRIVATE); + .setSelection(issue.getView_state().getId().intValue() == Viewstate.PRIVATE + .getCode()); } else { privateIssueButton.setSelection(false); } - privateNoteButton.setSelection(Integer.parseInt(session - .getConfigString("default_bugnote_view_status")) == ISession.VS_PRIVATE); + privateNoteButton + .setSelection(Integer.parseInt(session + .getConfigString("default_bugnote_view_status")) == Viewstate.PRIVATE + .getCode()); for (CustomFieldControl control : customControls) { control.refresh(); } @@ -365,9 +369,10 @@ private ObjectRef getViewState(boolean forPrivate) throws JMTException { ObjectRef[] viewStates = session.getEnum(Enumeration.VIEW_STATES); for (int i = 0; i < viewStates.length; i++) { - if (viewStates[i].getId().intValue() == ISession.VS_PRIVATE && forPrivate) { + if (viewStates[i].getId().intValue() == Viewstate.PRIVATE.getCode() && forPrivate) { return viewStates[i]; - } else if (viewStates[i].getId().intValue() == ISession.VS_PUBLIC && !forPrivate) { + } else if (viewStates[i].getId().intValue() == Viewstate.PUBLIC.getCode() + && !forPrivate) { return viewStates[i]; } } @@ -486,7 +491,7 @@ privateIssueButton.setText("Private"); return composite; } - + private void validate() { List<IStatus> status = new ArrayList<IStatus>(); if (summary.getText().trim().length() == 0) { @@ -502,7 +507,8 @@ for (CustomFieldControl customControl : customControls) { status.add(customControl.validate()); } - updateStatus(StatusUtil.getMostSevere((IStatus[]) status.toArray(new IStatus[status.size()]))); + updateStatus(StatusUtil.getMostSevere((IStatus[]) status + .toArray(new IStatus[status.size()]))); } protected void okPressed() { Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/AttachmentsSection.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/AttachmentsSection.java 2007-01-17 18:14:32 UTC (rev 100) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/AttachmentsSection.java 2007-01-17 18:18:51 UTC (rev 101) @@ -1,5 +1,5 @@ /* - * Copyright 2005 Peter Lanser + * Copyright 2006 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * @@ -24,7 +24,6 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -113,7 +112,6 @@ ImageHyperlink delete = toolkit.createImageHyperlink(composite, SWT.NONE); delete.setText("Delete"); delete.addHyperlinkListener(new ExistingAttachmentRemovalHyperlinkListener(attachments[i], delete)); - delete.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); } } @@ -139,8 +137,6 @@ section.setClient(container); } - - private void addNewAttachment(String filename) { if (! toAdd.contains(filename)) { toAdd.add(filename); @@ -158,7 +154,6 @@ toolkit.createLabel(composite, "(" + calcSize(file.length()) + ")", SWT.NONE); Hyperlink delete = toolkit.createHyperlink(composite, "Delete", SWT.NONE); delete.addHyperlinkListener(new NewAttachmentRemovalHyperlinkListener(filename, composite)); - delete.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); getManagedForm().reflow(true); getSection().layout(true); markDirty(); @@ -211,6 +206,7 @@ public void linkActivated(HyperlinkEvent event) { toAdd.remove(filename); composite.dispose(); + getManagedForm().reflow(true); getSection().layout(true); } @@ -238,6 +234,8 @@ .getImageRegistry().get( MantisConnectPlugin.IMG_DELETE_16)); } + link.getParent().layout(true); + getManagedForm().reflow(true); markDirty(); } Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/GeneralPage.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/GeneralPage.java 2007-01-17 18:14:32 UTC (rev 100) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/GeneralPage.java 2007-01-17 18:18:51 UTC (rev 101) @@ -27,6 +27,8 @@ import org.eclipse.ui.forms.widgets.TableWrapLayout; import org.mantisbt.connect.JMTException; import org.mantisbt.connect.eclipse.MantisConnectPlugin; +import org.mantisbt.connect.eclipse.util.RelationshipInfo; +import org.mantisbt.connect.service.RelationshipData; /** * @author Peter Lanser, pl...@us... @@ -36,15 +38,17 @@ public static final String TITLE = "General"; public static final String ID = "general"; - + private AttachmentsSection attachmentsSection; + private RelationshipsSection relationshipsSection; + public GeneralPage(IssueEditor editor) { super(editor, ID, TITLE); } public void doSave(IProgressMonitor monitor) { - monitor.beginTask("Updating attachments", 2); + monitor.beginTask("Updating attachments", 4); try { super.doSave(monitor); String[] attachmentsToAdd = attachmentsSection.getAttachmentsToAdd(); @@ -63,6 +67,27 @@ } } monitor.worked(1); + RelationshipInfo[] relationshipsToAdd = relationshipsSection.getRelationshipsToAdd(); + if (relationshipsToAdd.length > 0) { + monitor.subTask("Adding new relationships"); + for (int i = 0; i < relationshipsToAdd.length; i++) { + RelationshipData data = new RelationshipData(); + data.setTarget_id(relationshipsToAdd[i].getTargetId()); + data.setType(relationshipsToAdd[i].getType()); + getSession().addRelationship(getIssue().getId().longValue(), data); + } + } + monitor.worked(1); + BigInteger[] relatinshipsToDelete = relationshipsSection + .getRelationshipsToDelete(); + if (relatinshipsToDelete.length > 0) { + monitor.subTask("Deleting relationships"); + for (int i = 0; i < relatinshipsToDelete.length; i++) { + getSession().deleteRelationship(getIssue().getId().longValue(), + relatinshipsToDelete[i].longValue()); + } + } + monitor.worked(1); } catch (Exception e) { MantisConnectPlugin.getDefault().error("Error while updating attachments.", e, true); monitor.setCanceled(true); @@ -70,7 +95,7 @@ monitor.done(); } } - + private void addAttachment(String filename) throws IOException, JMTException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); FileInputStream fis = new FileInputStream(filename); @@ -98,7 +123,8 @@ } attachmentsSection = createAttachmentsSection(form.getBody()); managedForm.addPart(attachmentsSection); - managedForm.addPart(createRelationshipsSection(form.getBody())); + relationshipsSection = createRelationshipsSection(form.getBody()); + managedForm.addPart(relationshipsSection); } private RelationshipsSection createRelationshipsSection(Composite parent) { @@ -129,7 +155,7 @@ textSection.getSection().setLayoutData(gd); return textSection; } - + private ExpandableTextSection createAdditionalInfoSection(Composite parent) { ExpandableTextSection textSection = new AdditionalInfoSection(this, parent); TableWrapData gd = new TableWrapData(TableWrapData.FILL_GRAB); @@ -145,7 +171,7 @@ textSection.getSection().setLayoutData(gd); return textSection; } - + private CustomFieldsSection createCustomFieldsPart(Composite parent) { CustomFieldsSection part = new CustomFieldsSection(this, parent); TableWrapData gd = new TableWrapData(TableWrapData.FILL_GRAB); @@ -153,7 +179,7 @@ part.getSection().setLayoutData(gd); return part; } - + private MainAttributesSection createMainAttributesSection(Composite parent) { MainAttributesSection mainAttributesSection = new MainAttributesSection(this, parent); TableWrapData gd = new TableWrapData(TableWrapData.FILL_GRAB); Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/MainAttributesSection.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/MainAttributesSection.java 2007-01-17 18:14:32 UTC (rev 100) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/MainAttributesSection.java 2007-01-17 18:18:51 UTC (rev 101) @@ -28,6 +28,7 @@ import org.eclipse.ui.forms.widgets.Section; import org.eclipse.ui.forms.widgets.TableWrapData; import org.eclipse.ui.forms.widgets.TableWrapLayout; +import org.mantisbt.connect.AccessLevel; import org.mantisbt.connect.Enumeration; import org.mantisbt.connect.JMTException; import org.mantisbt.connect.eclipse.MantisConnectPlugin; @@ -150,7 +151,8 @@ private AccountData[] getProjectUsers(ObjectRef project, int level) { try { if (level >= 0) { - return getSession().getProjectUsers(project.getId().longValue(), level); + return getSession().getProjectUsers(project.getId().longValue(), + AccessLevel.fromCode(level)); } else { return null; } Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NewNoteSection.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NewNoteSection.java 2007-01-17 18:14:32 UTC (rev 100) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NewNoteSection.java 2007-01-17 18:18:51 UTC (rev 101) @@ -12,7 +12,7 @@ import org.eclipse.ui.forms.events.ExpansionEvent; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.Section; -import org.mantisbt.connect.ISession; +import org.mantisbt.connect.Viewstate; public class NewNoteSection extends IssuePart { @@ -62,8 +62,8 @@ private boolean getViewStateDefault() { try { - return Integer.parseInt(getSession().getConfigString( - "default_bugnote_view_status")) == ISession.VS_PRIVATE; + return Integer.parseInt(getSession().getConfigString("default_bugnote_view_status")) == Viewstate.PRIVATE + .getCode(); } catch (Exception e) { return false; } Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NotesPage.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NotesPage.java 2007-01-17 18:14:32 UTC (rev 100) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NotesPage.java 2007-01-17 18:18:51 UTC (rev 101) @@ -21,8 +21,8 @@ import org.eclipse.ui.forms.widgets.TableWrapData; import org.eclipse.ui.forms.widgets.TableWrapLayout; import org.mantisbt.connect.Enumeration; -import org.mantisbt.connect.ISession; import org.mantisbt.connect.JMTException; +import org.mantisbt.connect.Viewstate; import org.mantisbt.connect.eclipse.MantisConnectPlugin; import org.mantisbt.connect.service.IssueNoteData; import org.mantisbt.connect.service.ObjectRef; @@ -97,9 +97,10 @@ private ObjectRef getViewState(boolean forPrivate) throws JMTException { ObjectRef[] viewStates = getSession().getEnum(Enumeration.VIEW_STATES); for (int i = 0; i < viewStates.length; i++) { - if (viewStates[i].getId().intValue() == ISession.VS_PRIVATE && forPrivate) { + if (viewStates[i].getId().intValue() == Viewstate.PRIVATE.getCode() && forPrivate) { return viewStates[i]; - } else if (viewStates[i].getId().intValue() == ISession.VS_PUBLIC && !forPrivate) { + } else if (viewStates[i].getId().intValue() == Viewstate.PUBLIC.getCode() + && !forPrivate) { return viewStates[i]; } } Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NotesPart.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NotesPart.java 2007-01-17 18:14:32 UTC (rev 100) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NotesPart.java 2007-01-17 18:18:51 UTC (rev 101) @@ -39,7 +39,7 @@ import org.eclipse.ui.forms.widgets.ScrolledForm; import org.eclipse.ui.forms.widgets.TableWrapData; import org.eclipse.ui.forms.widgets.TableWrapLayout; -import org.mantisbt.connect.ISession; +import org.mantisbt.connect.Viewstate; import org.mantisbt.connect.eclipse.MantisConnectPlugin; import org.mantisbt.connect.service.IssueData; import org.mantisbt.connect.service.IssueNoteData; @@ -150,7 +150,7 @@ } private boolean isPrivate(IssueNoteData note) { - return note.getView_state().getId().intValue() == ISession.VS_PRIVATE; + return note.getView_state().getId().intValue() == Viewstate.PRIVATE.getCode(); } private class TextHyperlinkListener extends HyperlinkAdapter { Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/RelationshipsSection.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/RelationshipsSection.java 2007-01-17 18:14:32 UTC (rev 100) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/RelationshipsSection.java 2007-01-17 18:18:51 UTC (rev 101) @@ -1,5 +1,5 @@ /* - * Copyright 2005 Peter Lanser + * Copyright 2006 Peter Lanser * * MantisConnect is copyrighted to Victor Boctor * @@ -11,23 +11,37 @@ */ package org.mantisbt.connect.eclipse.editors; +import java.math.BigInteger; +import java.util.HashSet; + import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; +import org.eclipse.jface.dialogs.InputDialog; +import org.eclipse.swt.SWT; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.ui.IViewPart; import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.forms.events.HyperlinkAdapter; import org.eclipse.ui.forms.events.HyperlinkEvent; import org.eclipse.ui.forms.widgets.FormText; import org.eclipse.ui.forms.widgets.FormToolkit; +import org.eclipse.ui.forms.widgets.ImageHyperlink; import org.eclipse.ui.forms.widgets.Section; import org.eclipse.ui.forms.widgets.TableWrapData; import org.eclipse.ui.forms.widgets.TableWrapLayout; +import org.mantisbt.connect.Enumeration; import org.mantisbt.connect.JMTException; import org.mantisbt.connect.eclipse.MantisConnectPlugin; import org.mantisbt.connect.eclipse.actions.OpenIssueAction; +import org.mantisbt.connect.eclipse.dialogs.RelationshipDialog; +import org.mantisbt.connect.eclipse.util.RelationshipInfo; +import org.mantisbt.connect.eclipse.util.Utilities; +import org.mantisbt.connect.eclipse.views.MantisConnectView; import org.mantisbt.connect.service.IssueData; -import org.mantisbt.connect.service.ObjectRef; +import org.mantisbt.connect.service.IssueHeaderData; import org.mantisbt.connect.service.RelationshipData; /** @@ -35,6 +49,10 @@ */ public class RelationshipsSection extends IssuePart { + private HashSet<BigInteger> toDelete = new HashSet<BigInteger>(); + + private HashSet<RelationshipInfo> toAdd = new HashSet<RelationshipInfo>(); + private FormText formText; public RelationshipsSection(IssuePage page, Composite parent) { @@ -42,13 +60,113 @@ getSection().setText("Relationships"); } + public void refresh() { + toAdd.clear(); + toDelete.clear(); + Control[] children = ((Composite) getSection().getClient()).getChildren(); + for (int i = 0; i < children.length; i++) { + if (!(children[i] instanceof ImageHyperlink)) { + children[i].dispose(); + } + } + fillExistingRelationships((Composite) getSection().getClient(), getManagedForm() + .getToolkit()); + getSection().layout(true); + super.refresh(); + } + + private void fillExistingRelationships(Composite container, FormToolkit toolkit) { + RelationshipInfo[] relations = fetchRelations(); + for (int i = 0; i < relations.length; i++) { + RelationshipInfo relation = relations[i]; + Composite composite = toolkit.createComposite(container); + composite.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); + TableWrapLayout gl = new TableWrapLayout(); + gl.numColumns = 2; + gl.bottomMargin = gl.topMargin = gl.leftMargin = gl.rightMargin = 0; + composite.setLayout(gl); + FormText formText = createFormText(toolkit, relation, composite); + formText.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); + ImageHyperlink delete = toolkit.createImageHyperlink(composite, SWT.NONE); + delete.setText("Delete"); + delete.addHyperlinkListener(new ExistingRelationshipRemovalHyperlinkListener(relation, + delete)); + delete.setLayoutData(new TableWrapData(TableWrapData.RIGHT)); + } + } + + private FormText createFormText(FormToolkit toolkit, RelationshipInfo relation, + Composite composite) { + FormText formText = toolkit.createFormText(composite, true); + StringBuffer buffer = new StringBuffer("<form>"); + buffer.append("<li>").append(relation.getType().getName()); + if (relation.getTargetStatus() != null && relation.getTargetSummary() != null) { + buffer.append(" ").append(relation.getTargetId()); + buffer.append(" (").append( + Utilities.getEnumerationLabel(getSession(), Enumeration.STATUS, relation + .getTargetStatus())).append(") "); + buffer.append("<a href=\"").append(relation.getTargetId()).append("\">"); + buffer.append(relation.getTargetSummary()).append("</a>"); + } else { + buffer.append(" <a href=\"").append(relation.getTargetId()).append("\">"); + buffer.append(relation.getTargetId()).append("</a>"); + } + buffer.append("</li>"); + buffer.append("</form>"); + formText.setText(buffer.toString(), true, false); + formText.addHyperlinkListener(new HyperlinkAdapter() { + public void linkActivated(final HyperlinkEvent e) { + BusyIndicator.showWhile(getSection().getShell().getDisplay(), new Runnable() { + public void run() { + OpenIssueAction openIssueAction = new OpenIssueAction(getConnection(), + getSession(), Long.parseLong((String) e.getHref())); + openIssueAction.run(); + if (openIssueAction.getError() != null) { + if (openIssueAction.getError() instanceof PartInitException) { + MantisConnectPlugin.getDefault().error("Could not open part.", + openIssueAction.getError(), true); + } else if (openIssueAction.getError() instanceof JMTException) { + MantisConnectPlugin.getDefault().error("Could not fetch issue.", + openIssueAction.getError(), true); + } else { + MantisConnectPlugin.getDefault().error( + "An unexpected error occurred.", + openIssueAction.getError(), true); + } + } + } + }); + } + }); + return formText; + } + protected void createClient(Section section, FormToolkit toolkit) { Composite container = toolkit.createComposite(section); TableWrapLayout layout = new TableWrapLayout(); layout.bottomMargin = layout.topMargin = layout.leftMargin = layout.rightMargin = 2; - layout.verticalSpacing = 7; - layout.numColumns = 4; + layout.numColumns = 1; container.setLayout(layout); + ImageHyperlink addRelationship = toolkit.createImageHyperlink(container, SWT.NONE); + addRelationship.setText("Add relationship"); + addRelationship.setImage(MantisConnectPlugin.getDefault().getImageRegistry().get( + MantisConnectPlugin.IMG_NEW_16)); + addRelationship.addHyperlinkListener(new HyperlinkAdapter() { + public void linkActivated(HyperlinkEvent e) { + IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow() + .getActivePage().findView(MantisConnectView.ID); + IssueHeaderData[] issues = null; + if (view != null) { + issues = ((MantisConnectView) view).getCurrentIssues(); + } else { + issues = new IssueHeaderData[0]; + } + RelationshipDialog dialog = new RelationshipDialog(getSection().getShell(), issues); + if (dialog.open() == InputDialog.OK) { + addNewRelationship(dialog.getRelationship()); + } + } + }); formText = toolkit.createFormText(container, true); formText.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); formText.addHyperlinkListener(new HyperlinkAdapter() { @@ -75,68 +193,107 @@ }); } }); - fillFormText(); toolkit.paintBordersFor(container); section.setClient(container); } - - private void fillFormText() { - Relation[] relations = fetchRelations(); - StringBuffer buffer = new StringBuffer("<form>"); - for (int i = 0; i < relations.length; i++) { - buffer.append("<li>").append(relations[i].getType().getName()) - .append(" "); - buffer.append(relations[i].getIssue().getId()); - buffer.append(" (").append( - relations[i].getIssue().getStatus().getName()).append(") "); - buffer.append("<a href=\"").append(relations[i].getIssue().getId()) - .append("\">"); - buffer.append(relations[i].getIssue().getSummary()).append("</a>"); - buffer.append("</li>"); + + private void addNewRelationship(RelationshipInfo relationship) { + if (! toAdd.contains(relationship)) { + toAdd.add(relationship); + Composite container = (Composite) getSection().getClient(); + FormToolkit toolkit = getManagedForm().getToolkit(); + Composite composite = toolkit.createComposite(container); + composite.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); + TableWrapLayout gl = new TableWrapLayout(); + gl.numColumns = 2; + gl.bottomMargin = gl.topMargin = gl.leftMargin = gl.rightMargin = 0; + composite.setLayout(gl); + FormText formText = createFormText(toolkit, relationship, composite); + formText.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); + ImageHyperlink delete = toolkit.createImageHyperlink(composite, SWT.NONE); + delete.setText("Delete"); + delete.addHyperlinkListener(new NewRelationshipRemovalHyperlinkListener(relationship, + composite)); + delete.setLayoutData(new TableWrapData(TableWrapData.RIGHT)); + getManagedForm().reflow(true); + getSection().layout(true); + markDirty(); } - buffer.append("</form>"); - formText.setText(buffer.toString(), true, false); } - private Relation[] fetchRelations() { - Relation[] relations = new Relation[getIssue().getRelationships().length]; + private RelationshipInfo[] fetchRelations() { + RelationshipInfo[] relations = new RelationshipInfo[getIssue().getRelationships().length]; try { for (int i = 0; i < relations.length; i++) { RelationshipData relationship = getIssue().getRelationships()[i]; - relations[i] = new Relation(relationship.getType(), - getSession().getIssue( - relationship.getTarget_id().longValue())); + IssueData issue = getSession().getIssue(relationship.getTarget_id().longValue()); + relations[i] = new RelationshipInfo(relationship.getId(), relationship.getType(), + issue.getId(), issue.getSummary(), issue.getStatus().getId()); } } catch (Exception e) { - MantisConnectPlugin.getDefault().error( - "Could not fetch related issues.", e, true); - relations = new Relation[0]; + MantisConnectPlugin.getDefault().error("Could not fetch related issues.", e, true); + relations = new RelationshipInfo[0]; } return relations; } - - @Override + public IStatus[] validate() { return new IStatus[] { Status.OK_STATUS }; } + + public RelationshipInfo[] getRelationshipsToAdd() { + return toAdd.toArray(new RelationshipInfo[toAdd.size()]); + } + + public BigInteger[] getRelationshipsToDelete() { + return toDelete.toArray(new BigInteger[toDelete.size()]); + } + + private class NewRelationshipRemovalHyperlinkListener extends HyperlinkAdapter { + + private RelationshipInfo relation; + + private Composite composite; - private class Relation { + public NewRelationshipRemovalHyperlinkListener(RelationshipInfo relation, Composite composite) { + this.relation = relation; + this.composite = composite; + } + + public void linkActivated(HyperlinkEvent event) { + toAdd.remove(relation); + composite.dispose(); + getManagedForm().reflow(true); + getSection().layout(true); + } + + } - private ObjectRef type; + private class ExistingRelationshipRemovalHyperlinkListener extends HyperlinkAdapter { - private IssueData issue; + private RelationshipInfo relation; - public Relation(ObjectRef type, IssueData issue) { - this.type = type; - this.issue = issue; - } + private ImageHyperlink link; - public ObjectRef getType() { - return type; + public ExistingRelationshipRemovalHyperlinkListener(RelationshipInfo relation, ImageHyperlink link) { + this.relation = relation; + this.link = link; } - public IssueData getIssue() { - return issue; + public void linkActivated(HyperlinkEvent event) { + if (toDelete.contains(relation.getId())) { + toDelete.remove(relation.getId()); + link.setText("Delete"); + link.setImage(null); + } else { + toDelete.add(relation.getId()); + link.setText("Undelete"); + link.setImage(MantisConnectPlugin.getDefault().getImageRegistry().get( + MantisConnectPlugin.IMG_DELETE_16)); + } + link.getParent().layout(true); + getManagedForm().reflow(true); + markDirty(); } } Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/IssuesLabelProvider.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/IssuesLabelProvider.java 2007-01-17 18:14:32 UTC (rev 100) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/IssuesLabelProvider.java 2007-01-17 18:18:51 UTC (rev 101) @@ -24,13 +24,14 @@ import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.Image; +import org.mantisbt.connect.AccessLevel; import org.mantisbt.connect.Enumeration; -import org.mantisbt.connect.ISession; import org.mantisbt.connect.JMTException; +import org.mantisbt.connect.Viewstate; import org.mantisbt.connect.eclipse.MantisConnectPlugin; +import org.mantisbt.connect.eclipse.util.Utilities; import org.mantisbt.connect.service.AccountData; import org.mantisbt.connect.service.IssueHeaderData; -import org.mantisbt.connect.service.ObjectRef; /** * @author Peter Lanser, pl...@us... @@ -95,7 +96,7 @@ MantisConnectPlugin.IMG_PRIO_IMMEDIATE_16); } } else if (columnIndex == MantisConnectView.COLUMN_VIEWSTATE + prefixColumnCount) { - if (issue.getView_state().longValue() == ISession.VS_PRIVATE) { + if (issue.getView_state().longValue() == Viewstate.PRIVATE.getCode()) { return MantisConnectPlugin.getDefault().getImageRegistry().get( MantisConnectPlugin.IMG_PRIVATE_16); } @@ -138,10 +139,11 @@ } else if (columnIndex == MantisConnectView.COLUMN_CATEGORY + prefixColumnCount) { return issue.getCategory() == null ? "" : issue.getCategory(); } else if (columnIndex == MantisConnectView.COLUMN_SEVERITY + prefixColumnCount) { - return getEnumerationLabel(Enumeration.SEVERITIES, issue.getSeverity()); + return Utilities.getEnumerationLabel(view.getSession(), Enumeration.SEVERITIES, issue + .getSeverity()); } else if (columnIndex == MantisConnectView.COLUMN_STATUS + prefixColumnCount) { - StringBuffer buffer = new StringBuffer(getEnumerationLabel(Enumeration.STATUS, issue - .getStatus())); + StringBuffer buffer = new StringBuffer(Utilities.getEnumerationLabel(view.getSession(), + Enumeration.STATUS, issue.getStatus())); if (issue.getHandler() != null) { buffer.append(" (").append(getHandlerLabel(issue.getProject(), issue.getHandler())) .append(")"); @@ -168,8 +170,8 @@ private String getHandlerLabel(BigInteger projectId, BigInteger handler) { try { - AccountData[] data = view.getSession().getProjectUsers( - projectId.longValue(), ISession.AL_ANYBODY); + AccountData[] data = view.getSession().getProjectUsers(projectId.longValue(), + AccessLevel.ANYBODY); for (AccountData account : data) { if (account.getId().equals(handler)) { return account.getName(); @@ -180,23 +182,6 @@ return handler.toString(); } - private String getEnumerationLabel(Enumeration enumeration, BigInteger severity) { - try { - ObjectRef[] severities = view.getSession().getEnum(enumeration); - for (ObjectRef ref : severities) { - if (ref.getId().equals(severity)) { - return ref.getName(); - } - } - } catch (JMTException e) { - } - return severity.toString(); - } - - public void dispose() { - super.dispose(); - } - public Font getFont(Object element, int columnIndex) { if (columnIndex == MantisConnectView.COLUMN_UPDATED + prefixColumnCount && doHighlight(element)) { return JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT); Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/MantisConnectView.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/MantisConnectView.java 2007-01-17 18:14:32 UTC (rev 100) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/MantisConnectView.java 2007-01-17 18:18:51 UTC (rev 101) @@ -91,6 +91,8 @@ * @author Peter Lanser, pl...@us... */ public class MantisConnectView extends ViewPart implements IssueViewer { + + public static String ID = "org.mantisbt.connect.eclipse.views.MantisConnectView"; private static final String TAG_CURRENT_CONNECTION = "current-connection"; @@ -960,4 +962,8 @@ }); } + public IssueHeaderData[] getCurrentIssues() { + return (IssueHeaderData[]) issues.getInput(); + } + } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |