37 lines
1.2 KiB
Java
37 lines
1.2 KiB
Java
// Copyright (c) 2021, Fr.Terrot. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package io.gitea.mylyn.ui;
|
|
|
|
import java.util.Iterator;
|
|
import java.util.Set;
|
|
|
|
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
|
|
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
|
|
import org.eclipse.mylyn.tasks.ui.editors.TaskEditorPartDescriptor;
|
|
|
|
public class GiteaEditorPage extends AbstractTaskEditorPage {
|
|
|
|
public GiteaEditorPage(TaskEditor editor, String connectorKind) {
|
|
super(editor, connectorKind);
|
|
setNeedsPrivateSection(false);
|
|
setNeedsSubmitButton(true);
|
|
setNeedsAddToCategory(false);
|
|
}
|
|
|
|
@Override
|
|
protected Set<TaskEditorPartDescriptor> createPartDescriptors() {
|
|
Set<TaskEditorPartDescriptor> descriptors = super.createPartDescriptors();
|
|
// FIXME: remove unnecessary default editor parts
|
|
for (Iterator<TaskEditorPartDescriptor> it = descriptors.iterator(); it.hasNext();) {
|
|
TaskEditorPartDescriptor descriptor = it.next();
|
|
if (descriptor.getId().equals(ID_PART_PLANNING)) {
|
|
it.remove();
|
|
}
|
|
}
|
|
return descriptors;
|
|
}
|
|
|
|
}
|