16 * Assumptions/Requirement/Pre-requisites: |
16 * Assumptions/Requirement/Pre-requisites: |
17 * Failures and causes: |
17 * Failures and causes: |
18 */ |
18 */ |
19 package org.symbian.tools.tmw.ui.project; |
19 package org.symbian.tools.tmw.ui.project; |
20 |
20 |
21 import java.io.InputStream; |
|
22 |
|
23 import org.eclipse.core.databinding.observable.value.IObservableValue; |
21 import org.eclipse.core.databinding.observable.value.IObservableValue; |
24 import org.eclipse.core.resources.IFile; |
22 import org.symbian.tools.tmw.core.projects.IProjectSetupConfig; |
25 import org.eclipse.core.resources.IProject; |
|
26 import org.eclipse.core.runtime.CoreException; |
|
27 import org.eclipse.core.runtime.IPath; |
|
28 import org.eclipse.core.runtime.IProgressMonitor; |
|
29 import org.symbian.tools.tmw.core.projects.IProjectSetupAction; |
|
30 import org.symbian.tools.tmw.core.runtimes.IMobileWebRuntime; |
23 import org.symbian.tools.tmw.core.runtimes.IMobileWebRuntime; |
31 |
24 |
32 /** |
25 /** |
33 * Provides template values. |
26 * Provides template values. |
34 * |
27 * |
35 * @author Eugene Ostroukhov (eugeneo@symbian.org) |
28 * @author Eugene Ostroukhov (eugeneo@symbian.org) |
36 */ |
29 */ |
37 public interface IProjectTemplateContext extends IProjectSetupAction { |
30 public interface IProjectTemplateContext extends IProjectSetupConfig { |
38 /** |
31 /** |
39 * @return runtime that the project targets |
32 * @return runtime that the project targets |
40 */ |
33 */ |
41 IMobileWebRuntime getRuntime(); |
34 IMobileWebRuntime getRuntime(); |
42 |
35 |
53 String[] getParameterNames(); |
46 String[] getParameterNames(); |
54 |
47 |
55 void putParameter(String key, Object value); |
48 void putParameter(String key, Object value); |
56 |
49 |
57 /** |
50 /** |
58 * Allows the framework to reduce dependance on exact project layout. I.e. |
|
59 * some IDEs may want to introduce separation of the web resources and |
|
60 * JavaScript source files. |
|
61 * |
|
62 * @param project project to add file to |
|
63 * @param name file path relative to application root |
|
64 * @param contents stream with file contents |
|
65 * @param monitor progress monitor |
|
66 * @throws CoreException |
|
67 */ |
|
68 IFile addFile(IProject project, IPath name, InputStream contents, IProgressMonitor monitor) throws CoreException; |
|
69 |
|
70 /** |
|
71 * Allows binding to parameter value from UI. |
51 * Allows binding to parameter value from UI. |
72 * |
52 * |
73 * @param name parameter value |
53 * @param name parameter value |
74 * @return observable that may be used to bind value |
54 * @return observable that may be used to bind value |
75 */ |
55 */ |