📄 isdlanguagemodule.cs
字号:
// ISdLanguageInformation.cs
// Copyright (c) 2001 Mike Krueger
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System.Collections;
using System.Windows.Forms;
using System.Xml;
using SharpDevelop.Internal.Templates;
using SharpDevelop.Gui.Edit;
using SharpDevelop.Gui;
using SharpDevelop.Gui.Window;
namespace SharpDevelop.Internal.Project {
/// <summary>
/// This class holds all information the ContentWindow needs from a
/// language module to create a view.
/// It is needed to create own, custom views of a Content, this may not be
/// a textarea, this can be anything :)
/// </summary>
public class WindowContentPane
{
public Control Pane = null;
public ISdEditable ISdEditable = null;
}
/// <summary>
/// This class holds all information the language modules need to create
/// a predefined project for their language, if no project template for a
/// specific language is avaible, the language modules shouldn't care about
/// this stuff.
/// </summary>
public class ProjectCreateInformation
{
public string Name;
public string Solution;
public string Location;
public string Description; // not yet used
public ProjectTemplate ProjectTemplate;
}
/// <summary>
/// This class holds all information the language modules need to create
/// a predefined file for their language, if no file template for a
/// specific language is avaible, the language modules shouldn't care about
/// this stuff.
/// </summary>
public class FileCreateInformation
{
public string Name;
public string Solution;
public string Location;
public string Description; // not yet used
public ProjectTemplate ProjectTemplate;
}
public interface ISdProjectCreator
{
/// <returns>
/// A new empty project object.
/// </returns>
ISdProject EmptyProject {
get;
}
ISdProject CreateProject(ProjectCreateInformation info);
}
public interface ISdFileCreator
{
string CreateFile(FileCreateInformation info);
}
public interface ISdDisplayModule
{
/// <returns>
/// The WindowContentPane of the ContentWindow which displays a file for this
/// "language" definition.
/// May return null, in this case a TextArea is assumed for this language.
/// </returns>
WindowContentPane GetContentPane(MainWindow mainwindow, ContentWindow window);
}
/// <summary>
/// All language modules MUST define a class called "LanguageInformation" in
/// their DLL, this class MUST not be inside a namespace and it MUST implement
/// this interface to communicate with SharpDevelop.
/// </summary>
public interface ISdLanguageModule
{
/// <returns>
/// An ISdFileCreator object, it doesn't need to be newed everytime.
/// Returns null if there is no new file template for this language type available.
/// </returns>
ISdFileCreator FileCreator {
get;
}
/// <returns>
/// An ISdProjectCreator object, it doesn't need to be newed everytime.
/// Returns null if there is no project management for this language type available.
/// </returns>
ISdProjectCreator ProjectCreator {
get;
}
/// <returns>
/// A compiler object, it doesn't need to be newed everytime. Returns null if there is
/// no compilation for this language type available.
/// </returns>
ISdCompiler Compiler {
get;
}
/// <summary>
/// This function executes a file, the filename is given by filename,
/// the file was compiled by the compiler object before.
/// </summary>
void Execute(MainWindow mainwindow, string filename);
/// <summary>
/// This function executes a project, the project is given as a parameter,
/// the project was compiled by the compiler object before.
/// </summary>
void Execute(MainWindow mainwindow, ISdProject project);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -