Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Unified Diff: experimental/visual_studio_plugin/src/MsAd7.BaseImpl/DocumentPosition.cs

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: experimental/visual_studio_plugin/src/MsAd7.BaseImpl/DocumentPosition.cs
diff --git a/experimental/visual_studio_plugin/src/MsAd7.BaseImpl/DocumentPosition.cs b/experimental/visual_studio_plugin/src/MsAd7.BaseImpl/DocumentPosition.cs
deleted file mode 100644
index 2247deed0341620ce2c660f7c1974ce3d44f712d..0000000000000000000000000000000000000000
--- a/experimental/visual_studio_plugin/src/MsAd7.BaseImpl/DocumentPosition.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Text;
-using Microsoft.VisualStudio;
-using Microsoft.VisualStudio.Debugger.Interop;
-
-namespace Google.MsAd7.BaseImpl
-{
- public class DocumentPosition : IDebugDocumentPosition2
- {
-
- public DocumentPosition(IDebugDocumentPosition2 pos) {
- pos.GetDocument(out doc_);
- pos.GetFileName(out path_);
- TEXT_POSITION[] begin = new TEXT_POSITION[1];
- TEXT_POSITION[] end = new TEXT_POSITION[1];
- pos.GetRange(begin, end);
- beginPos_ = begin[0];
- endPos_ = end[0];
- }
-
- public DocumentPosition(string path, uint line) {
- path_ = path;
- beginPos_.dwLine = line;
- beginPos_.dwColumn = 0;
- endPos_ = beginPos_;
- }
-
- public string Path {
- get { return path_; }
- set { path_ = value; }
- }
-
- public TEXT_POSITION BeginPos {
- get { return beginPos_; }
- set { beginPos_ = value; }
- }
-
- public TEXT_POSITION EndPos {
- get { return endPos_; }
- set { endPos_ = value; }
- }
-
- public IDebugDocument2 Doc {
- get { return doc_; }
- set { doc_ = value; }
- }
-
- public override bool Equals(object obj)
- {
- DocumentPosition other = obj as DocumentPosition;
- bool result = (other != null);
- result = result && (path_ == other.path_);
- result = result && (beginPos_.Equals(other.beginPos_));
- result = result && (endPos_.Equals(other.endPos_));
- return result;
- }
-
- public override int GetHashCode()
- {
- Int64 accumulator = path_.GetHashCode() << 32 | beginPos_.GetHashCode();
- accumulator = accumulator.GetHashCode() << 32 | endPos_.GetHashCode();
- return accumulator.GetHashCode();
- }
-
- #region Implementation of IDebugDocumentPosition2
-
- public int GetFileName(out string pbstrFileName) {
- Debug.WriteLine("DocumentPosition.GetFileName");
- pbstrFileName = path_;
- return VSConstants.S_OK;
- }
-
- public int GetDocument(out IDebugDocument2 ppDoc) {
- Debug.WriteLine("DocumentPosition.GetDocument");
- ppDoc = doc_;
- return VSConstants.S_OK;
- }
-
- public int IsPositionInDocument(IDebugDocument2 pDoc) {
- Debug.WriteLine("DocumentPosition.IsPositionInDocument");
- throw new NotImplementedException();
- }
-
- public int GetRange(TEXT_POSITION[] pBegPosition, TEXT_POSITION[] pEndPosition) {
- Debug.WriteLine("DocumentPosition.GetRange");
- pBegPosition[0] = beginPos_;
- pEndPosition[0] = endPos_;
- return VSConstants.S_OK;
- }
-
- #endregion
-
- private string path_;
- private TEXT_POSITION beginPos_ = new TEXT_POSITION();
- private TEXT_POSITION endPos_ = new TEXT_POSITION();
- private IDebugDocument2 doc_ = null;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698