use of org.eclipse.mylyn.tasks.core.TaskRepository in project linuxtools by eclipse.
the class TestOSIORestGetUser method setUp.
@Before
public void setUp() {
connector = new TestOSIORestConnector();
repository = new TaskRepository(connector.getConnectorKind(), "http://openshift.io/api");
repository.setProperty(IOSIORestConstants.REPOSITORY_AUTH_ID, "user");
repository.setProperty(IOSIORestConstants.REPOSITORY_AUTH_TOKEN, "xxxxxxTokenxxxxxx");
requestProvider = new OSIOTestRestRequestProvider();
}
use of org.eclipse.mylyn.tasks.core.TaskRepository in project linuxtools by eclipse.
the class TestOSIORestPatchUpdateTask method setUp.
@Before
public void setUp() {
connector = new TestOSIORestConnector();
repository = new TaskRepository(connector.getConnectorKind(), "http://openshift.io/api");
repository.setProperty(IOSIORestConstants.REPOSITORY_AUTH_ID, "user");
repository.setProperty(IOSIORestConstants.REPOSITORY_AUTH_TOKEN, "xxxxxxTokenxxxxxx");
requestProvider = new OSIOTestRestRequestProvider();
}
use of org.eclipse.mylyn.tasks.core.TaskRepository in project linuxtools by eclipse.
the class TestOSIORestPostNewLabel method setUp.
@Before
public void setUp() {
connector = new TestOSIORestConnector();
repository = new TaskRepository(connector.getConnectorKind(), "http://openshift.io/api");
repository.setProperty(IOSIORestConstants.REPOSITORY_AUTH_ID, "user");
repository.setProperty(IOSIORestConstants.REPOSITORY_AUTH_TOKEN, "xxxxxxTokenxxxxxx");
requestProvider = new OSIOTestRestRequestProvider();
}
use of org.eclipse.mylyn.tasks.core.TaskRepository in project linuxtools by eclipse.
the class OSIORestTestFixture method repository.
public TaskRepository repository() {
if (repository != null) {
return repository;
}
repository = new TaskRepository(getConnectorKind(), getRepositoryUrl());
UserCredentials credentials = CommonTestUtil.getCredentials(PrivilegeLevel.USER);
repository.setCredentials(org.eclipse.mylyn.commons.net.AuthenticationType.REPOSITORY, new AuthenticationCredentials(credentials.getUserName(), credentials.getPassword()), true);
return repository;
}
use of org.eclipse.mylyn.tasks.core.TaskRepository in project linuxtools by eclipse.
the class RepositoryQuerySchemaPage method createPageContent.
@Override
protected void createPageContent(@NonNull SectionComposite parent) {
this.scrolledComposite = parent;
Composite scrolledBodyComposite = scrolledComposite.getContent();
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 10;
layout.horizontalSpacing = 0;
layout.verticalSpacing = 10;
scrolledBodyComposite.setLayout(layout);
Composite attributesComposite = new Composite(scrolledBodyComposite, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).span(2, 1).applyTo(attributesComposite);
layout = new GridLayout(6, false);
layout.marginHeight = 20;
layout.marginWidth = 10;
attributesComposite.setLayout(layout);
GridData g = new GridData(GridData.FILL, GridData.FILL, true, true);
g.widthHint = 600;
attributesComposite.setLayoutData(g);
attributesComposite.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND));
FormToolkit toolkit = new FormToolkit(parent.getDisplay());
TaskRepository repository = getTaskRepository();
ITask nTask = new TaskTask(repository.getConnectorKind(), repository.getRepositoryUrl(), data.getTaskId());
ITaskDataWorkingCopy workingCopy = TasksUi.getTaskDataManager().createWorkingCopy(nTask, data);
final TaskDataModel model = new TaskDataModel(repository, nTask, workingCopy);
factory = new RepositoryQueryAttributeEditorFactory(model, repository);
model.addModelListener(new TaskDataModelListener() {
@Override
public void attributeChanged(TaskDataModelEvent event) {
getContainer().updateButtons();
}
});
targetTaskData = workingCopy.getLocalData();
final TaskAttribute target = targetTaskData.getRoot();
createFieldControls(attributesComposite, toolkit, layout.numColumns, target);
Point p = scrolledBodyComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
scrolledComposite.setMinSize(p);
}
Aggregations