blob: 52fbe34341f7538cc62a05136afe03c15e5b6993 (
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
/*******************************************************************************
* Copyright (c) 2018 Remain Software
* 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:
* wim.jongman@remainsoftware.com - initial API and implementation
*******************************************************************************/
package org.eclipse.tips.core;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.tips.core.internal.TipManager;
/**
* The ITipManager interface.
*
*/
public interface ITipManager {
/**
* Indicates whether already read tips must be served or not.
*
* @return true or false
* @see TipManager#setServeReadTips(boolean)
*/
public boolean mustServeReadTips();
/**
* Consults TipManager to determine the Tip's read status.
*
* @param tip the tip to query for its read status
* @return true if the tip is read, false otherwise.
*/
public abstract boolean isRead(Tip tip);
/**
* Instructs the TipManager to mark this tip as read.
*
* @param tip the tip to set as read.
* @return this
*/
public abstract ITipManager setAsRead(Tip tip);
/**
* Central place of logging for the Tip Framework.
*
* @param status the {@link IStatus} which may not be null
* @return this
*/
public ITipManager log(IStatus status);
/**
* Binds the passed provider to this manager. After registration, ITipManager
* implementations should asynchronously call the
* {@link TipProvider#loadNewTips(org.eclipse.core.runtime.IProgressMonitor)}
* method.
*
* @param provider the {@link TipProvider} to register which may not be null.
* @return this
*/
public ITipManager register(TipProvider provider);
/**
* Opens the Tip of the Day dialog.
*
* @param startUp When called from a startup situation, true must be passed for
* <code>startup</code>. If in a manual starting situation,
* false must be passed. This enables the manager to decide to
* skip opening the dialog at startup (e.g., no new tip items).
*
* @return this
*
* @see #isOpen()
*/
public ITipManager open(boolean startUp);
/**
* Returns the open state.
*
* @return true if this manager is open, false otherwise.
*/
public boolean isOpen();
}
|