本文整理汇总了C#中JadeCore类的典型用法代码示例。如果您正苦于以下问题:C# JadeCore类的具体用法?C# JadeCore怎么用?C# JadeCore使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JadeCore类属于命名空间,在下文中一共展示了JadeCore类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SearchResultsPaneViewModel
public SearchResultsPaneViewModel(JadeCore.Search.ISearchController controller)
{
Title = "Search Results";
ContentId = "SearchResultsToolPane";
_controller = controller;
_searches = new ObservableCollection<SearchViewModel>();
((INotifyCollectionChanged)_controller.Searches).CollectionChanged +=
delegate(object sender, NotifyCollectionChangedEventArgs e)
{
if (e.Action == NotifyCollectionChangedAction.Add)
{
OnNewSearch((ISearch)e.NewItems[0]);
}
};
_currentFileTextSearch = new CurrentFileTextSearchViewModel(_controller);
JadeCore.Services.Provider.EditorController.ActiveDocumentChanged += delegate { OnPropertyChanged("CanPerformSearchInCurrentFile"); };
JadeCore.Services.Provider.MainWindow.CommandBindings.Add(new CommandBinding(JadeCore.Commands.SearchCurrentFile,
delegate(object target, ExecutedRoutedEventArgs args)
{
RaiseStartNewCurrentFileSearch();
args.Handled = true;
},
delegate(object target, CanExecuteRoutedEventArgs args)
{
args.CanExecute = CanPerformSearchInCurrentFile;
args.Handled = true;
}));
}
开发者ID:JadeHub,项目名称:Jade,代码行数:32,代码来源:SearchResultsPaneViewModel.cs
示例2: MakeFolder
static private FolderType MakeFolder(JadeCore.Workspace.IFolder folder, string workspaceDir)
{
FolderType result = new FolderType();
result.Name = folder.Name;
FolderType[] subs = new FolderType[folder.Folders.Count];
for (int i = 0; i < folder.Folders.Count; i++)
{
subs[i] = MakeFolder(folder.Folders[i], workspaceDir);
}
result.Folders = subs;
List<JadeCore.Workspace.ProjectItem> projTemps = new List<JadeCore.Workspace.ProjectItem>();
foreach (JadeCore.Workspace.ProjectItem proj in folder.Items.OfType<JadeCore.Workspace.ProjectItem>())
{
projTemps.Add(proj);
}
ProjectType[] projs = new ProjectType[projTemps.Count];
for(int i=0;i<projTemps.Count;i++)
{
projs[i] = MakeProject(projTemps[i], workspaceDir);
}
result.Projects = projs;
return result;
}
开发者ID:JadeHub,项目名称:Jade,代码行数:26,代码来源:WorkspaceReaderWriter.cs
示例3: MakeFile
static private FileType MakeFile(JadeCore.Project.FileItem file, string projectDir)
{
FileType result = new FileType();
//Convert to relative path for storage in workspace
result.Path = JadeUtils.IO.PathUtils.CalculateRelativePath(projectDir + @"\", file.Path.Str);
return result;
}
开发者ID:JadeHub,项目名称:Jade,代码行数:7,代码来源:ProjectReaderWriter.cs
示例4: SearchResultItemViewModel
public SearchResultItemViewModel(JadeCore.Search.ISearchResult result)
{
_result = result;
StringBuilder sb = new StringBuilder();
sb.Append(result.Location.Path.Str);
sb.Append(" - ");
JadeCore.ITextDocument doc = JadeCore.Services.Provider.WorkspaceController.DocumentCache.FindOrAdd(result.File);
_file = doc.File;
LineNum = doc.GetLineNumForOffset(result.Location.Offset);
ISegment line = doc.GetLineForOffset(result.Location.Offset);
if(line != null)
{
int column = result.Location.Offset - line.Offset + 1;
sb.Append("(");
sb.Append(LineNum);
sb.Append(",");
sb.Append(column);
sb.Append(")");
sb.Append(": ");
sb.Append(doc.GetText(line).Trim());
}
_summary = sb.ToString();
}
开发者ID:JadeHub,项目名称:Jade,代码行数:26,代码来源:SearchResultViewModel.cs
示例5: Highlighter
public Highlighter(JadeCore.ITextDocument doc)
{
if (doc == null)
throw new ArgumentNullException("doc");
_document = doc;
_highlights = new TextSegmentCollection<HighlightedRange>();
_textViews = new List<TextView>();
}
开发者ID:JadeHub,项目名称:Jade,代码行数:8,代码来源:Underliner.cs
示例6: MakeProject
static private ProjectType MakeProject(JadeCore.Workspace.ProjectItem proj, string workspaceDir)
{
ProjectType result = new ProjectType();
//Convert to relative path for storage in workspace
result.Path = JadeUtils.IO.PathUtils.CalculateRelativePath(workspaceDir + @"\", proj.Path.Str);
Persistence.Project.Writer.Write(proj, proj.Path.Str);
return result;
}
开发者ID:JadeHub,项目名称:Jade,代码行数:9,代码来源:WorkspaceReaderWriter.cs
示例7: EditorControlViewModel
public EditorControlViewModel(JadeCore.IEditorController controller, IDocumentViewModelFactory docViewModelFactory)
{
//Bind to the Model
_controller = controller;
_controller.ActiveDocumentChanged += OnControllerActiveDocumentChanged;
_controller.DocumentClosed += OnControllerDocumentClosed;
_documents = new ObservableCollection<DocumentViewModel>();
_docViewModelFactory = docViewModelFactory;
}
开发者ID:JadeHub,项目名称:Jade,代码行数:9,代码来源:EditorControlViewModel.cs
示例8: OutputViewModel
public OutputViewModel(JadeCore.Output.IOutputController controller)
{
Title = "Output";
ContentId = "OutputToolPane";
_Controller = controller;
_Items = new JadeCore.Collections.ObservableCollectionTransform<JadeCore.Output.IItem, OutputItemViewModel>(_Controller.Items,
delegate (JadeCore.Output.IItem i){ return new OutputItemViewModel(i); });
_Items.CollectionChanged += ItemsCollectionChanged;
_sb = new StringBuilder();
}
开发者ID:JadeHub,项目名称:Jade,代码行数:10,代码来源:OutputControlViewModel.cs
示例9: ContextPaneViewModel
public ContextPaneViewModel(JadeCore.IEditorController editCtrl)
{
Title = "Context Tool";
ContentId = "ContextToolPane";
_editorController = editCtrl;
_root = new ObservableCollection<DeclarationViewModel>();
_files = new HashSet<FilePath>();
JadeCore.Services.Provider.CppParser.TranslationUnitIndexed += OnCppParserTranslationUnitIndexed;
}
开发者ID:JadeHub,项目名称:Jade,代码行数:10,代码来源:ContextPaneViewModel.cs
示例10: FindProjectFolder
/*
1) Find the Folder definitions
<Filter Include="Source">
<UniqueIdentifier>{1a2da8c0-5f2c-4e2e-bd3f-3c94e4c7925b}</UniqueIdentifier>
</Filter>
2) then look for source files
<ClCompile Include="..\test.cpp">
<Filter>Source</Filter>
</ClCompile>
3) then look for headers
<ClInclude Include="..\template.h">
<Filter>Header Files</Filter>
</ClInclude>
*/
private JadeCore.Project.IFolder FindProjectFolder(JadeCore.Project.IFolder parent, string path)
{
string[] parts = path.Split('\\');
if (parts.Length == 0) return null;
JadeCore.Project.IFolder result = parent;
foreach (string name in parts)
{
result = result.FindFolder(name);
if (result == null)
return null;
}
return result;
}
开发者ID:JadeHub,项目名称:Jade,代码行数:30,代码来源:ProjectFiltersFileReader.cs
示例11: GetLevelText
private string GetLevelText(JadeCore.Output.Level level)
{
switch (level)
{
case(JadeCore.Output.Level.Crit):
return "Critical: ";
case (JadeCore.Output.Level.Err):
return "Error: ";
case (JadeCore.Output.Level.Info):
return "Information: ";
case (JadeCore.Output.Level.Warn):
return "Warning: ";
}
throw new InvalidOperationException("Bad Level");
}
开发者ID:JadeHub,项目名称:Jade,代码行数:16,代码来源:OutputControlViewModel.cs
示例12: MakeFolder
private static JadeCore.Project.IFolder MakeFolder(JadeCore.Project.IProject project, string projectDir, FolderType xml, IFileService fileService)
{
JadeCore.Project.Folder folder = new JadeCore.Project.Folder(project, xml.Name);
foreach (FileType f in xml.Files)
{
project.AddItem(folder, MakeFile(projectDir, f, fileService));
//folder.AddItem(MakeFile(projectDir, f, fileService));
}
foreach (FolderType f in xml.Folders)
{
folder.AddFolder(MakeFolder(project, projectDir, f, fileService));
}
return folder;
}
开发者ID:JadeHub,项目名称:Jade,代码行数:17,代码来源:ProjectReaderWriter.cs
示例13: WorkspaceFolder
public WorkspaceFolder(TreeNodeBase parent, JadeCore.Workspace.IFolder data)
: base(data.Name, parent)
{
_data = data;
foreach (JadeCore.Workspace.IFolder f in _data.Folders)
{
WorkspaceFolder folder = new WorkspaceFolder(this, f);
AddChildFolder(f);
}
foreach (JadeCore.Workspace.IItem item in _data.Items)
{
if (item is JadeCore.Project.IProject)
{
AddChildProject(item as JadeCore.Project.IProject);
}
}
}
开发者ID:JadeHub,项目名称:Jade,代码行数:18,代码来源:WorkspaceFolderNode.cs
示例14: ProjectFolder
public ProjectFolder(TreeNodeBase parent, JadeCore.Project.IFolder data)
: base(data.Name, parent)
{
_data = data;
foreach (JadeCore.Project.IFolder f in _data.Folders)
{
AddChildFolder(new ProjectFolder(this, f));
}
foreach (JadeCore.Project.IItem i in _data.Items)
{
if (i is JadeCore.Project.FileItem)
{
AddChildFile(new File(this, i as JadeCore.Project.FileItem));
}
}
}
开发者ID:JadeHub,项目名称:Jade,代码行数:18,代码来源:ProjectFolderNode.cs
示例15: FindFileItem
private IFileItem FindFileItem(JadeCore.Project.IFolder folder, FilePath path)
{
foreach(IItem item in folder.Items)
{
if(item is FileItem)
{
if ((item as FileItem).Path == path)
return item as FileItem;
}
}
foreach(IFolder child in folder.Folders)
{
IFileItem result = FindFileItem(child, path);
if (result != null)
return result;
}
return null;
}
开发者ID:JadeHub,项目名称:Jade,代码行数:20,代码来源:Project.cs
示例16: LoadSettings
private void LoadSettings(JadeCore.Properties.Settings settings)
{
if (settings.RecentWorkspaceFiles != null)
{
_recentFiles.Load(settings.RecentWorkspaceFiles);
}
}
开发者ID:JadeHub,项目名称:Jade,代码行数:7,代码来源:WorkspaceController.cs
示例17: CloseWorkspace
public CloseWorkspace(JadeCore.ViewModels.IJadeViewModel vm)
{
_viewModel = vm;
}
开发者ID:JadeHub,项目名称:Jade,代码行数:4,代码来源:test.cs
示例18: OpenWorkspace
public OpenWorkspace(JadeCore.ViewModels.IJadeViewModel vm)
{
_viewModel = vm;
}
开发者ID:JadeHub,项目名称:Jade,代码行数:4,代码来源:test.cs
示例19: SaveAsWorkspace
public SaveAsWorkspace(JadeCore.ViewModels.IJadeViewModel vm)
{
_viewModel = vm;
}
开发者ID:JadeHub,项目名称:Jade,代码行数:4,代码来源:test.cs
示例20: OnOpenDocument
public void OnOpenDocument(JadeCore.OpenFileCommandParams param)
{
IInputElement focus = FocusManager.GetFocusedElement(_view);
OnOpenFile(param.File);
//todo: if selected is now as requested...
if (_editorViewModel.SelectedDocument != null)
_editorViewModel.SelectedDocument.DisplayLocation(param.DisplayParams.Location.Offset, param.DisplayParams.SetFocus, param.DisplayParams.Scroll);
if (!param.DisplayParams.SetFocus)
FocusManager.SetFocusedElement(_view, focus);
}
开发者ID:JadeHub,项目名称:Jade,代码行数:14,代码来源:JadeViewModel.cs
注:本文中的JadeCore类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论