blob: 961d2804eec47043e5c2b18c9b76c3e50ba78f12 (
plain) (
blame)
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
49
50
51
52
53
54
55
56
57
58
59
60
|
/*****************************************************************************
* Copyright (c) 2013 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* CEA LIST - Initial API and implementation
*****************************************************************************/
package org.eclipse.papyrus.views.properties.toolsmiths.storage.actions;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.papyrus.infra.properties.contexts.Context;
import org.eclipse.papyrus.infra.properties.ui.runtime.IConfigurationManager;
/**
* An action that may be contributed to the Properties View customization dialog on the <tt>org.eclipse.papyrus.customization.properties.contextStorage</tt> extension point
* to implement copying a {@link Context} to the corresponding storage provider.
*/
public interface IContextCopyAction {
/**
* Queries the (translated) label to show in a copy button in the Properties customization dialog.
*
* @return the label to show in the copy button in the customization dialog
*/
String getLabel();
/**
* Queries the (translated) tool tip to show on a copy button in the Properties customization dialog.
*
* @return the optional tool tip to show on the copy button in the customization dialog.
* May be {@code null}
*/
String getToolTip();
/**
* Copy an existing context to a new one with the given name.
* The new context is registered to the {@link IConfigurationManager}.
*
* @param source
* The source Context to copy
* @param targetName
* The name of the new context
* @param monitor
* A monitor to track the progress of the copy operation. Will not be {@code null}
* @return
* The new Context
*
* @throws CoreException
* If an error occurred : the previous context cannot be read, or
* the new context cannot be created
*/
Context copy(Context source, String targetName, IProgressMonitor monitor) throws CoreException;
}
|