forked from microsoft/copilot-for-eclipse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCopilotPreferencesPage.java
More file actions
48 lines (41 loc) · 2.03 KB
/
Copy pathCopilotPreferencesPage.java
File metadata and controls
48 lines (41 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
package com.microsoft.copilot.eclipse.ui.preferences;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
/**
* This class is used to create the root preference page for the plugin.
*/
public class CopilotPreferencesPage extends PreferencePage implements IWorkbenchPreferencePage {
public static final String ID = "com.microsoft.copilot.eclipse.ui.preferences.CopilotPreferencesPage";
@Override
protected Control createContents(Composite parent) {
Composite container = new Composite(parent, SWT.NONE);
container.setLayout(new GridLayout(1, true));
Label label = new Label(container, SWT.WRAP);
label.setText("Select a category to view or change its settings.");
PreferencePageUtils.createPreferenceLink(getShell(), container, "<a>General</a>", null, GeneralPreferencesPage.ID);
PreferencePageUtils.createPreferenceLink(getShell(), container, "<a>Chat</a>", null, ChatPreferencesPage.ID);
PreferencePageUtils.createPreferenceLink(getShell(), container, "<a>Completions</a>", null,
CompletionsPreferencesPage.ID);
PreferencePageUtils.createPreferenceLink(getShell(), container, "<a>Custom Instructions</a>", null,
CustomInstructionPreferencePage.ID);
PreferencePageUtils.createPreferenceLink(getShell(), container, "<a>Custom Agents</a>", null,
CustomModesPreferencePage.ID);
PreferencePageUtils.createPreferenceLink(getShell(), container, "<a>Model Context Protocol (MCP)</a>", null,
McpPreferencePage.ID);
PreferencePageUtils.createPreferenceLink(getShell(), container, "<a>Model Management</a>", null,
ByokPreferencePage.ID);
return container;
}
@Override
public void init(IWorkbench workbench) {
// do nothing
}
}