author | Eugene Ostroukhov <eugeneo@symbian.org> |
Mon, 16 Aug 2010 16:23:25 -0700 | |
changeset 465 | 87920e15f8eb |
parent 463 | aea4c83725d8 |
child 466 | 129c94e78375 |
permissions | -rw-r--r-- |
463
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
1 |
/** |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
2 |
* Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies). |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
3 |
* All rights reserved. |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
8 |
* |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
10 |
* Symbian Foundation - initial contribution. |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
11 |
* Contributors: |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
12 |
* Description: |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
13 |
* Overview: |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
14 |
* Details: |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
15 |
* Platforms/Drives/Compatibility: |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
16 |
* Assumptions/Requirement/Pre-requisites: |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
17 |
* Failures and causes: |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
18 |
*/ |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
19 |
package org.symbian.tools.tmw.ui.project; |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
20 |
|
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
21 |
import java.io.InputStream; |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
22 |
|
465
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
23 |
import org.eclipse.core.databinding.observable.value.IObservableValue; |
463
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
24 |
import org.eclipse.core.resources.IProject; |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
25 |
import org.eclipse.core.runtime.CoreException; |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
26 |
import org.eclipse.core.runtime.IPath; |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
27 |
import org.eclipse.core.runtime.IProgressMonitor; |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
28 |
import org.symbian.tools.tmw.core.projects.IProjectSetupAction; |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
29 |
import org.symbian.tools.tmw.core.runtimes.IMobileWebRuntime; |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
30 |
|
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
31 |
/** |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
32 |
* Provides template values. |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
33 |
* |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
34 |
* @author Eugene Ostroukhov (eugeneo@symbian.org) |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
35 |
*/ |
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
36 |
public interface IProjectTemplateContext extends IProjectSetupAction { |
465
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
37 |
/** |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
38 |
* @return runtime that the project targets |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
39 |
*/ |
463
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
40 |
IMobileWebRuntime getRuntime(); |
465
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
41 |
|
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
42 |
/** |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
43 |
* @param parameter name of the parameter |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
44 |
* @return parameter value. In most cases parameters will be string values |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
45 |
* but template developers can use any types |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
46 |
*/ |
463
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
47 |
Object getParameter(String parameter); |
465
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
48 |
|
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
49 |
/** |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
50 |
* @return array of parameter names |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
51 |
*/ |
463
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
52 |
String[] getParameterNames(); |
465
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
53 |
|
463
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
54 |
void putParameter(String key, Object value); |
465
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
55 |
|
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
56 |
/** |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
57 |
* Allows the framework to reduce dependance on exact project layout. I.e. |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
58 |
* some IDEs may want to introduce separation of the web resources and |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
59 |
* JavaScript source files. |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
60 |
* |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
61 |
* @param project project to add file to |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
62 |
* @param name file path relative to application root |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
63 |
* @param contents stream with file contents |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
64 |
* @param monitor progress monitor |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
65 |
* @throws CoreException |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
66 |
*/ |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
67 |
void addFile(IProject project, IPath name, InputStream contents, IProgressMonitor monitor) throws CoreException; |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
68 |
|
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
69 |
/** |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
70 |
* Allows binding to parameter value from UI. |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
71 |
* |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
72 |
* @param name parameter value |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
73 |
* @return observable that may be used to bind value |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
74 |
*/ |
87920e15f8eb
Added a way to contribute wizard pages for templates
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
463
diff
changeset
|
75 |
IObservableValue getParameterObservable(String name); |
463
aea4c83725d8
Project template work-in-progress
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
diff
changeset
|
76 |
} |