Setting up a JIRA repository in custom Eclipse plugin [message #69212] |
Tue, 02 June 2009 11:14 |
Jochen Hebbrecht Messages: 12 Registered: July 2009 |
Junior Member |
|
|
Hi,
We are currently trying to write a custom Eclipse plugin that configures
some project settings.
One of these project settings, is setting up JIRA repository in the
workspace. Of course, we will use Mylyn for this.
It's my first time, writing an Eclipse plugin and I have some questions.
--------------------------------------------
public class JiraProjectConfigurerImpl implements JiraProjectConfigurer {
public void configure(IProject project, IProgressMonitor monitor)
throws CoreException {
TaskRepository repository = new
TaskRepository(JiraCorePlugin.CONNECTOR_KIND, "http://MYCOMPANY/jira/");
repository.setCredentials(AuthenticationType.REPOSITORY, new
AuthenticationCredentials("MYUSERNAME", "MYPASSWORD"), false);
Project[] projects = new Project[1];
projects[0] = new Project();
projects[0].setId("MYPROJECTNAME");
FilterDefinition filter = new FilterDefinition();
filter.setProjectFilter(new ProjectFilter(projects));
JiraUtil.setQuery(repository, ???, filter);
TasksUi.getRepositoryManager().addRepository(repository);
}
}
--------------------------------------------
a) can somebody tell me what kind of query should be created in the "???"
place (see above)?
b) is this the correct way of setting up a JIRA repository? Because I'm
getting these warnings:
Description Resource Path Location Type
Discouraged access: The constructor FilterDefinition() is not accessible
due to restriction on required library
C:\APPZ\Eclipse\ganymede-sr2-fresh\plugins\org.eclipse.mylyn .jira.core_3.1.1.v20090411-0400-e3x.jar JiraProjectConfigurerImpl.java rd-eclipse-plugin-maven/src/main/java/com/MYCOMPANY/eclipse/ tools/atlassian/impl line
41 Java Problem
Thanks in advance,
Jochen
|
|
|
Powered by
FUDForum. Page generated in 0.03098 seconds